-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to avoid the schema error: element "bibl" incomplete; missing required element "ptr" #256
Comments
I don't think this is new. It has been years that I have been annoyed at having to remove or comment out altogether the |
You may have had something different? The absence of |
For cases like that, I am in favor of the "comment things out" option. The main problem is that TEI grammars do not allow you to express context-dependent rules. You cannot say, for instance, that an element must have an attribute X in some context and an attribute Y in another. You need to allow both attributes and add extra code later on to sort things out. This is sometimes inevitable, but it is better avoided whenever possible. The more you do it, the more your schema looks like code, the less "declarative" (viz. static, inert, unlike a program) it becomes. This makes it harder to reason about, and this makes the contextual help generated by Oxygen (and the TEI documentation, see e.g. https://dharman.in/documentation/inscription) less useful. @arlogriffiths All modern editors have keyboard shortcuts to comment/uncomment things. In Oxygen, you have the command "Toggle comment", bound to Ctrl+Shift+Comma per default. |
I'm not entirely happy with that. We already have contextual rules for the bibliography, e.g. it seems that |
In this case, it is best to allow |
Thanks for spotting this. This must have been what my foggy memory of an earlier occurrence of the dummy bibliography pointer idea was about. Is it used anywhere outside the siddham corpus? Apparently, there I decided to refer to the Zotero ID AuthorYear_01 when the schema showed an error unless a reference was present. So, @arlogriffiths and @michaelnmmeyer , shall we make this official, mention it in the guides, revise the inscription templates (and other templates as the case may be) accordingly, and make the change (automated as far as possible) in existing XML files? The empty bibliography in the Siddham files looks like this:
In the template, instructions could be added in comment to replace the empty p with the epigraphic lemma and replace the dummy bibl elements in the structured bibliographies with the actual citations relevant to the inscription. Or, if we don't want to go this way, then the question still remains: should the schema allow empty |
The "John Doe" entries are used in various files, not only siddham. I just allowed empty |
So to be clear, am I right that this means the following:
If so, this sounds good to me; let's see what @arlogriffiths says. |
@danbalogh Yes, exactly. |
The schema now raises an error when a
<bibl>
element has no<ptr>
child. This is all right, but it creates a problem that I think is not unique to my subcorpus. Sometimes, there exists no secondary bibliography and/or no primary bibliography for an inscription (or none is encoded yet), but I would prefer to keep the skeleton of that section in the XML file, in case it can be populated later. My solution so far has been to usewhere the empty
<bibl/>
element is necessary because without it, the earlier schema also raised an error. But now the above is also flagged as an error. I could imagine the following solutions, but I don't know which if any are most feasible:<bibl/>
(or empty<bibl n="siglum"/>
, see below) is the only child of a<listBibl>
, then the absence of<ptr>
is not an error (most convenient for me, since I can keep what I have);#bib:NONE)
that would mean "no known bibliography" and instead of<bibl/>
, encode e.g.<bibl><ptr target="bib:NONE"/></bibl>
(I would then replace my empty bibl items with this);<listBibl>
container.What do you think, @michaelnmmeyer ?
I should add that I've just checked our inscription templates, and the use of empty
<bibl/>
(or<bibl n="siglum"/>
in case of the primary bibliography) is present there too, so at the moment, even our template is in conflict with the schema.The text was updated successfully, but these errors were encountered: