<div dir="ltr">Oh, great! I didn't realize that was valid in ODD. <div><br></div><div>Raff</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 24, 2015 at 3:41 PM, Roland, Perry D. (pdr4h) <span dir="ltr"><<a href="mailto:pdr4h@eservices.virginia.edu" target="_blank">pdr4h@eservices.virginia.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Thanks, I see the errors now.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">In the attached ODD, I moved the <constraintSpec> defining the MEI prefix from the <mei> element to the start of the <schemaSpec>. As a result, the RNG contains the namespace
definition for MEI as an immediate descendant of <grammar> (although, unlike the TEI namespace declaration, it occurs at the very end of the file) and the errors disappear.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">I’ll fix this in the MEI source momentarily.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">--<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">p.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><u></u> <u></u></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> mei-l [mailto:<a href="mailto:mei-l-bounces@lists.uni-paderborn.de" target="_blank">mei-l-bounces@lists.uni-paderborn.de</a>]
<b>On Behalf Of </b>Raffaele Viglianti<br>
<b>Sent:</b> Tuesday, November 24, 2015 3:08 PM</span></p><div><div class="h5"><br>
<b>To:</b> Music Encoding Initiative<br>
<b>Subject:</b> Re: [MEI-L] Stylesheet compilation: undeclared namespace prefix<u></u><u></u></div></div><p></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hi Perry,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">To reproduce Anna's error, I associated the RNG schema with "additional association for embedded schematron rules" in Oxygen. When validating, I got an error on the @context of rules, because they use the "mei" prefix. The schematron engine
complains because it doesn't know what the "mei" prefix is. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The mei prefix is set (for schematron) in the "mei" elementSpec:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"><constraintSpec ident="set_ns" scheme="isoschematron"><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <constraint><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <sch:ns prefix="mei" uri="<a href="http://www.music-encoding.org/ns/mei" target="_blank">http://www.music-encoding.org/ns/mei</a>"/><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> </constraint><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"></constraintSpec><u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">If the MEI element is not included, this declaration gets dropped. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">There is another solution to this, now that I think about it: re-instating the namespace declaration on the new root element. For example in Anna's case one could add the constraintSpec above to the "expression"'s elementSpec (I just tested
this and the error goes away).<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I suspect you're right about the TEI stylesheet automagically adding the tei prefix to schematron. It doesn't hurt having it, however. We may still bring this up with TEI folks and see if it's possible to avoid that declaration in a non
TEI context.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Raff<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Tue, Nov 24, 2015 at 2:45 PM, Roland, Perry D. (pdr4h) <<a href="mailto:pdr4h@eservices.virginia.edu" target="_blank">pdr4h@eservices.virginia.edu</a>> wrote:<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">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.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">I don’t see what effect the element --</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><sch:ns xmlns:sch="<a href="http://purl.oclc.org/dsdl/schematron" target="_blank">http://purl.oclc.org/dsdl/schematron</a>"
prefix="tei" uri="<a href="http://www.tei-c.org/ns/1.0" target="_blank">http://www.tei-c.org/ns/1.0</a>"/></span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">can have on schematron validation when every pattern and every rule is explicitly defined to be in the schematron
namespace, e.g.,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><pattern xmlns="<a href="http://purl.oclc.org/dsdl/schematron" target="_blank">http://purl.oclc.org/dsdl/schematron</a>"</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> id="mei-att.notationtype-notationsubtype-When_notationsubtype-constraint-1"></span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <sch:rule xmlns:a="<a href="http://relaxng.org/ns/compatibility/annotations/1.0" target="_blank">http://relaxng.org/ns/compatibility/annotations/1.0</a>"</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> xmlns="<a href="http://www.tei-c.org/ns/1.0" target="_blank">http://www.tei-c.org/ns/1.0</a>" xmlns:rng="<a href="http://relaxng.org/ns/structure/1.0" target="_blank">http://relaxng.org/ns/structure/1.0</a>"</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> xmlns:sch="<a href="http://purl.oclc.org/dsdl/schematron" target="_blank">http://purl.oclc.org/dsdl/schematron</a>"
context="mei:*[@notationsubtype]"></span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <sch:assert test="@notationtype">An element with a notationsubtype attribute must have a notationtype attribute.</sch:assert></span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </sch:rule></span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""></pattern></span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">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.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">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.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">--</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">p.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span><u></u><u></u></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> mei-l [mailto:<a href="mailto:mei-l-bounces@lists.uni-paderborn.de" target="_blank">mei-l-bounces@lists.uni-paderborn.de</a>]
<b>On Behalf Of </b>Anna Plaksin<br>
<b>Sent:</b> Tuesday, November 24, 2015 10:55 AM<br>
<b>To:</b> 'Music Encoding Initiative'<br>
<b>Subject:</b> Re: [MEI-L] Stylesheet compilation: undeclared namespace prefix</span><u></u><u></u></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><span lang="DE" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Raff,</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="DE" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">you’re totally right, it works.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Now I can see how the schematron works properly in an MEI schema even with a TEI namespace.
</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thank you very, very much for throwing light on this miracle. :-)</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Regards,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Anna</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><b><span lang="DE" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Von:</span></b><span lang="DE" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> mei-l
[<a href="mailto:mei-l-bounces@lists.uni-paderborn.de" target="_blank">mailto:mei-l-bounces@lists.uni-paderborn.de</a>]
<b>Im Auftrag von </b>Raffaele Viglianti<br>
<b>Gesendet:</b> Dienstag, 24. November 2015 16:31<br>
<b>An:</b> Music Encoding Initiative <<a href="mailto:mei-l@lists.uni-paderborn.de" target="_blank">mei-l@lists.uni-paderborn.de</a>><br>
<b>Betreff:</b> Re: [MEI-L] Stylesheet compilation: undeclared namespace prefix</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="DE"> </span><u></u><u></u></p>
<div>
<p class="MsoNormal"><span lang="DE">Hi Anna,</span><u></u><u></u></p>
<div>
<p class="MsoNormal"><span lang="DE"> </span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE">The "mei" prefix is set by the mei element (<a href="https://github.com/music-encoding/music-encoding/blob/develop/source/specs/mei-source.xml#L15325" target="_blank">see
code here</a>), 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).</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE"> </span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE">I would suggest to set schemaSpec/@start to "mei expression", which seems to fix the problem and makes the customization more conformant.</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE"> </span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE">Hope this helps.</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE"> </span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE">Best,</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE">Raff</span><u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="DE"> </span><u></u><u></u></p>
<div>
<p class="MsoNormal"><span lang="DE">On Tue, Nov 24, 2015 at 10:19 AM, Anna Plaksin <<a href="mailto:annplaksin@gmx.net" target="_blank">annplaksin@gmx.net</a>> wrote:</span><u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal"><span style="color:#1f497d">Hello again,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">I just added the wrong version of the file to the mail…</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">Sorry for that.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">Anna</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span lang="DE">Von:</span></b><span lang="DE"> mei-l [mailto:<a href="mailto:mei-l-bounces%2Bannplaksin" target="_blank">mei-l-bounces+annplaksin</a>=<a href="mailto:gmx.net@lists.uni-paderborn.de" target="_blank">gmx.net@lists.uni-paderborn.de</a>]
<b>Im Auftrag von </b>Anna Plaksin<br>
<b>Gesendet:</b> Dienstag, 24. November 2015 16:14<br>
<b>An:</b> mei-l <<a href="mailto:mei-l@lists.uni-paderborn.de" target="_blank">mei-l@lists.uni-paderborn.de</a>><br>
<b>Betreff:</b> [MEI-L] Stylesheet compilation: undeclared namespace prefix</span><u></u><u></u></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="DE"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="DE">Hello all,</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="DE"> </span><u></u><u></u></p>
<p class="MsoNormal">maybe the ODD experts could help me with this issue:<u></u><u></u></p>
<p class="MsoNormal">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.<u></u><u></u></p>
<p class="MsoNormal">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.<u></u><u></u></p>
<p class="MsoNormal">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.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">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?<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">Anna<u></u><u></u></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="DE"><br>
_______________________________________________<br>
mei-l mailing list<br>
<a href="mailto:mei-l@lists.uni-paderborn.de" target="_blank">mei-l@lists.uni-paderborn.de</a><br>
<a href="https://lists.uni-paderborn.de/mailman/listinfo/mei-l" target="_blank">https://lists.uni-paderborn.de/mailman/listinfo/mei-l</a></span><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><span lang="DE"> </span><u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
mei-l mailing list<br>
<a href="mailto:mei-l@lists.uni-paderborn.de" target="_blank">mei-l@lists.uni-paderborn.de</a><br>
<a href="https://lists.uni-paderborn.de/mailman/listinfo/mei-l" target="_blank">https://lists.uni-paderborn.de/mailman/listinfo/mei-l</a><u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>
</div>
<br>_______________________________________________<br>
mei-l mailing list<br>
<a href="mailto:mei-l@lists.uni-paderborn.de">mei-l@lists.uni-paderborn.de</a><br>
<a href="https://lists.uni-paderborn.de/mailman/listinfo/mei-l" rel="noreferrer" target="_blank">https://lists.uni-paderborn.de/mailman/listinfo/mei-l</a><br>
<br></blockquote></div><br></div>