Skip to content
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

which namespaces shall be magic? #2454

Closed
sydb opened this issue Aug 9, 2023 · 2 comments
Closed

which namespaces shall be magic? #2454

sydb opened this issue Aug 9, 2023 · 2 comments

Comments

@sydb
Copy link
Member

sydb commented Aug 9, 2023

For the foreseeable future, Schematron uses a different mechanism of binding a namespace prefix to a namespace URI than does XML. So a Schematron schema that processes a TEI ODD file is likely to need to have something like

<sch:ns prefix="tei" uri="http://www.tei-c.org/ns/1.0"/>
<sch:ns prefix="xs" uri="http://www.w3.org/2001/XMLSchema"/>
<sch:ns prefix="rng" uri="http://relaxng.org/ns/structure/1.0"/>
<sch:ns prefix="sch" uri="http://purl.oclc.org/dsdl/schematron"/>
<sch:ns prefix="teix" uri="http://www.tei-c.org/ns/Examples"/>

in it.
The question is, which namespaces, if any, should the processor insert for the user, and which namespaces should the user be forced to explicitly declare?. Which is the same as asking which namespace prefixes should “work” by magic, and which ones should cause an error until the poor user figures out how to declare them?
I believe that at the moment the TEI Stylesheets only insert a declaration for one namespace automagically (the "tei:" prefix). Furthermore, the TEI Guidelines explicitly declare the "tei:", "xs:", "rng:", "sch:", and "s:" prefixes (that last one is for old Schematron). Thus any user using ODD for customizing (or writing) TEI P5 does not need to declare those. (Note: I added one more in a branch just recently, but I forget which branch. Sigh.)
I think there are three possible avenues, with some variation:

  1. ATOP should not declare any prefixes automagically. A user of the ODD system simply must declare any prefixes that are used.
  2. ATOP should insert declarations for as many so-called “standard” prefixes (like tei:, rng:, sch:, xs: or xsd:, rnga:, xsl:, teix:, mets:, mods:, xd:, etc.) as we can come up with.
  3. ATOP should insert declarations for only those prefixes that are necessary for standard ODD usage (tei:, rng:, sch:, teix:, I guess).

Remeber that this will mostly impact people like the TEI Council and those who write languages like MEI. They will need to express <sch:ns> elements in their <constraintDecl> element (see #2330). Users who are customizing a language like TEI or MEI would only need to declare prefixes that are not declared in the main languages’ <constraintDecl>.

I was wobbly on this issue in the past, but now that I have spent time thinking about it while writing it down here, I am pretty strongly in favor of (1).

@martindholmes
Copy link
Contributor

The ATOP group discussed this today, and we all agree that no magic (1) is the best approach.

@ebeshero
Copy link
Member

As of 11 August 2023, Council quietly agrees with the wisdom of ATOP on this ticket.

@ebeshero ebeshero added this to the Guidelines 4.7.0 milestone Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants