-
Notifications
You must be signed in to change notification settings - Fork 84
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
TEI @xmlns #2621
Comments
Hi @KAKDH ! <TEI xmlns="http://www.tei-c.org/ns/1.0">
<t:TEI xmlns:t="http://www.tei-c.org/ns/1.0">
<tei:TEI xmlns:tei="http://www.tei-c.org/ns/1.0">
<ns03:TEI xmlns:ns03="http://www.tei-c.org/ns/1.0">
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:tei="http://www.tei-c.org/ns/1.0"> I think (but am not at all sure) the point here is that the vast majority of TEI users use first one, above, and all the examples in the Guidelines are designed to be copy-and-posted into documents that are set up that way. Anyone want to take a crack at better wording? I have assigned @GusRiva to implement (as I am on ticket assignment duty with @trishaoconnor until tomorrow. : - ), but anyone can propose better wording. It currently says: <p>This element is required. It is customary to specify the TEI
namespace <ident type="ns">http://www.tei-c.org/ns/1.0</ident> on
it, for example: <tag type="start">TEI version="4.4.0"
xml:lang="it" xmlns="http://www.tei-c.org/ns/1.0"</tag>.</p> Notes |
Oh, forgot to mention that |
Hi @sydb, Sure, and I get your point and agree. The teiCorpus entry, however, isn’t structured in the same way ([https://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-teiCorpus.html]), i.e. there is no note that your teiCorpus should have ns declaration, even though the tei_all.rng also gives you an error if there isn’t one. The note reads “Should contain one TEI header for the corpus, and a series of TEI elements, one for each text.” I might be wrong, but I think the confusion for my students comes from the fact that TEI XMLs are the very first XMLs they are working with, so xmlns not being included in the list of attributes is confusing. In class, when we look for attributes allowed on a certain element, we go to the REF section of the guidelines and look for the attributes in the table and ns isn’t there, so we're lost. :) All the best, |
Response to @KAKDH Oh, good point (that the So I agree wholeheartedly that the “notes” section for both should be more forceful. But there is not much more we can do. The reason To prove this to yourself, enter this wee snippet into a new XML document oXygen: <?xml version="1.0" encoding="UTF-8"?>
<greeting xmlns="http://www.example.edu/ns" xml:lang="en" type="secular">Happy Holidays!</greeting> Then, using the XPath box in the upper L, search for all attributes with (Oxygen, at least for me, is inconsistent about whether it colors namespace declarations the same as attributes or not; but in any case, the non-prefixed namespace has always been the same color as an attribute, IIRC.) The good news, of course, is that all the examples of For implementer(s) <remarks versionDate="2024-12-01" xml:lang="en">
<p>As with all elements in the TEI scheme (except <gi>egXML</gi>) this element is
in the TEI namespace. (See <ptr target="#SGname"/>.) Thus, when it is used as the
outermost element of a TEI document it is necessary to specify the TEI namespace
on it. This is customarily achieved by specifying the TEI namespace
<ident type="ns">http://www.tei-c.org/ns/1.0</ident> without indicating a prefix,
and then not using a prefix on TEI elements in the rest of the document. For example:
<tag type="start">TEI version="4.8.1" xml:lang="it" xmlns="http://www.tei-c.org/ns/1.0"</tag>.</p>
</remarks> Notes |
Hi @sydb, Thanks a lot for your thorough response. This is very helpful – as always. A quick off-topic, just to give you some context where my question is coming from: All the best, |
This discussion was a very interesting read! |
Hello,
Not sure this is an issue, but at least a quick consistency question about xmlns on TEI:
In the current guidelines, the TEI element has highlighted the version attribute & some att.classes that one can also use. Further in the notes, it adds that "It is customary to specify the TEI namespace http://www.tei-c.org/ns/1.0 on it." (See: [https://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-TEI.html] )
The current tei_all.rng that gets automatically associated with new tei_all type documents in Oxygen has version optional and xmlns required, which confuses my students substantially.
Would it make sense to either update the guidelines to reflect the best practice, or update the schema to make both of them optional?
All the best,
K.
The text was updated successfully, but these errors were encountered: