[MEI-L] Stylesheet compilation: undeclared namespace prefix

Roland, Perry D. (pdr4h) pdr4h at eservices.virginia.edu
Tue Nov 24 20:45:47 CET 2015


Hmmmm.  I can't reproduce the errors Anna is seeing.  But, forcing every customization to include the <mei> element seems like a 'gotcha' to me.  Moving the <constraintSpec>  that defines the mei prefix for schematron to be the first child of <schemaSpec> seems be the answer.  But I can't test that properly since I get no errors either way.

I don't see what effect the element --

<sch:ns xmlns:sch="http://purl.oclc.org/dsdl/schematron" prefix="tei" uri="http://www.tei-c.org/ns/1.0"/>

can have on schematron validation when every pattern and every rule is explicitly defined to be in the schematron namespace, e.g.,

<pattern xmlns="http://purl.oclc.org/dsdl/schematron"
  id="mei-att.notationtype-notationsubtype-When_notationsubtype-constraint-1">
  <sch:rule xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
    xmlns="http://www.tei-c.org/ns/1.0" xmlns:rng="http://relaxng.org/ns/structure/1.0"
    xmlns:sch="http://purl.oclc.org/dsdl/schematron" context="mei:*[@notationsubtype]">
    <sch:assert test="@notationtype">An element with a notationsubtype attribute must have a notationtype attribute.</sch:assert>
  </sch:rule>
</pattern>

The @xmlns attribute on <rule> is superfluous since <rule> is explicitly placed in the schematron namespace by the use of the "sch:" prefix and the @xmlns:sch attribute.

It seems to me that the TEI namespace is an unnecessary and misleading artifact of using the TEI stylesheets to produce the RNG.  But perhaps there's something I'm missing.

--
p.


From: mei-l [mailto:mei-l-bounces at lists.uni-paderborn.de] On Behalf Of Anna Plaksin
Sent: Tuesday, November 24, 2015 10:55 AM
To: 'Music Encoding Initiative'
Subject: Re: [MEI-L] Stylesheet compilation: undeclared namespace prefix

Hi Raff,

you're totally right, it works.
Now I can see how the schematron works properly in an MEI schema even with a TEI namespace.
Thank you very, very much for throwing light on this miracle. :-)

Regards,
Anna

Von: mei-l [mailto:mei-l-bounces at lists.uni-paderborn.de] Im Auftrag von Raffaele Viglianti
Gesendet: Dienstag, 24. November 2015 16:31
An: Music Encoding Initiative <mei-l at lists.uni-paderborn.de<mailto:mei-l at lists.uni-paderborn.de>>
Betreff: Re: [MEI-L] Stylesheet compilation: undeclared namespace prefix

Hi Anna,

The "mei" prefix is set by the mei element (see code here<https://github.com/music-encoding/music-encoding/blob/develop/source/specs/mei-source.xml#L15325>), therefore you have to make sure the element is included in your customization. By setting schemaSpec/@start to just "expression", I *think* the mei element gets excluded by the ODD processing (because it's not needed).

I would suggest to set schemaSpec/@start to "mei expression", which seems to fix the problem and makes the customization more conformant.

Hope this helps.

Best,
Raff

On Tue, Nov 24, 2015 at 10:19 AM, Anna Plaksin <annplaksin at gmx.net<mailto:annplaksin at gmx.net>> wrote:
Hello again,

I just added the wrong version of the file to the mail...

Sorry for that.

Anna

Von: mei-l [mailto:mei-l-bounces+annplaksin<mailto:mei-l-bounces%2Bannplaksin>=gmx.net at lists.uni-paderborn.de<mailto:gmx.net at lists.uni-paderborn.de>] Im Auftrag von Anna Plaksin
Gesendet: Dienstag, 24. November 2015 16:14
An: mei-l <mei-l at lists.uni-paderborn.de<mailto:mei-l at lists.uni-paderborn.de>>
Betreff: [MEI-L] Stylesheet compilation: undeclared namespace prefix

Hello all,

maybe the ODD experts could help me with this issue:
I'm working on a MEI customization and since yesterday I get pattern syntax errors complaining about an undeclared namespace prefix in the schematron rules after the compilation from ODD to Relax NG.
It seems to me a little bit weird because I didn't make big changes in my ODD file and the errors occur both at my own schematron rules and the preexisting.
I'm using the TEI framework in Oxygen 17.1 with the driver.xml of the v2.1.1, but it occurs also with the customization web service. It is possible to correct the errors in the output file by changing the schematron <ns> from TEI to MEI but this cannot be a proper solution, because the namespace is always TEI even if the schema works fine.

I think it is most likely a mistake I've done but I just don't find it. Is someone able to explain it to me?

Thanks,
Anna

_______________________________________________
mei-l mailing list
mei-l at lists.uni-paderborn.de<mailto:mei-l at lists.uni-paderborn.de>
https://lists.uni-paderborn.de/mailman/listinfo/mei-l

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-paderborn.de/pipermail/mei-l/attachments/20151124/a8f219e4/attachment.html>


More information about the mei-l mailing list