Conversation
a working, if not ideal, state
raffazizzi
left a comment
There was a problem hiding this comment.
Suggested different content models for contraintDecl and encodingDesc
|
I resolved the merge conflict over TD (to reconcile the new material about constraintDecl with another update earlier in the chapter--may want to take a look at TD, but I think this is what we want. |
There was a problem hiding this comment.
Everything works here: all tests are passing, the Guidelines build and validate. Also,<constraintDecl> is functioning in a tester ODD I created from the CBML ODD with a new Schematron rule and an application of <constraintDecl>.
There's one thing that's bothering me about the expected behavior of <constraintDecl> as exemplified in its element spec.
We have this in the egXML:
<constraintDecl scheme="schematron" queryBinding="xslt3">
<sch:ns prefix="wwp" uri="http://www.wwp.northeastern.edu/ns/textbase"/>
</constraintDecl>
But that does not work in my ODD to RNG transformation. The output RNG doesn't show an error, but when applied to a validate an XML file, validation fails due to an error over the unrecognized namespace (the one declared as shown in the egXML).
To make this work, I had to modify my tester ODD to set the <sch:ns/> element (with its @prefix and @uri inside the <constraint> of my <constraintSpec>--it had to be set in the immediate content of a schematron rule. I think this wasn't the intention /expected behavior of constraintDecl was it?
I'm attaching my tester files, built on the CBML ODD with a simple Schematron test on cbml elements.
out-PR2594.zip
| <exemplum xml:lang="en"> | ||
| <egXML xmlns="http://www.tei-c.org/ns/Examples"> | ||
| <constraintDecl scheme="schematron" queryBinding="xslt3"> | ||
| <sch:ns prefix="wwp" uri="http://www.wwp.northeastern.edu/ns/textbase"/> |
There was a problem hiding this comment.
This code does not function to deliver a specialized namespace to the constraintSpecs that evoke it, but we don't see this until we attempt to validate XML with the output RNG. I had to declare the sch:ns later on within the <constraintSpec> (immediately within a <constraint> element) for it to be recognized by Schematron and function for validation.
|
I cannot tell if @ebeshero means we should not merge this PR until Stylesheets#697 has been addressed, or she was just not aware that it has not been addressed. Thus this PR now NEEDS DISCUSSION to figure that out. Personally I would like to see this handled pretty quickly, as several major files are changed and I would just as soon avoid a merge nightmare. |
|
@sydb It was probably this: "she was just not aware that it has not been addressed". Shall we address TEIC/Stylesheets#697 then? |
|
Suppose so. I am not sure why @trishaoconnor (& I) put the PENDING label on it. Seems to me we are good to go for someone to do it and generate PR, no? I am not very familiar with the odds/teiodds.xsl code, but since (IIRC) there is no way to assert a query language binding when Schematron occurs inside RELAX NG, this may be as simple as setting up a template that matches |
Added
<constraintDecl>element.