You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use the schema in Oxygen to validate a file, you'll get an error as soon as Oxygen tries to compile the Schematron from the RNG file to XSLT in the background. The error is:
Errors were reported during stylesheet compilation
Variable exceptions has not been declared (or its declaration is not in scope)
I think the reason is that the Schematron rule is being created here in the context of the <attDef> of @except, and this line tries to execute in that context:
I have a suspicion that such an expression can only be executed in the context of an element, not an attribute, so the variable doesn't get created properly and the subsequent operations relying on it fail. I think in the RNG it ends up being in the context of the parent <moduleRef> element.
Assigning this to @sydb because he'll know exactly what to do. To test the fix, commit, wait for the build process to complete through to the bleeding-edge plugin, update your plugin, then create a File / New using the TEI for TEI Customizations template, and validate the resulting file.
The text was updated successfully, but these errors were encountered:
@sydb and I working on this today discovered three constraints defined in the context of attDefs in this schema. We checked the Schematron specification, and there is definitely nothing wrong with this:
The rule context is interpreted according to the Production 1 of XSLT1. The rule context may be root nodes, elements, attributes, comments and processing instructions. An implementation may allow the rule context to be text nodes at user option however implementations may reject or fail to implement schemas which specify text nodes.
However, the TEI Stylesheets don't handle this in the expected way; they hoist the constraint to the next level (in the case of this @except attribute, the parent <moduleRef> definition). So that Stylesheets problem does need to be fixed. However, for the moment, moving the constraints manually will make this particular schema work. We should either:
Decide that in the context of a TEI ODD, we only want constraints at the root level or at the <*Spec> level, and enforce that in the schema; or
Fix the Stylesheets so that they're able to keep constraints in their original location in the output RELAX NG.
* Move the constraint specification for "need-required", which tests `@except`, from inside the `<attDef>` for `@except` up one level into the `<elementSpec>` for `<moduleRef>`. This is a work-around, but it works perfectly well and is not actually problematic. Nonetheless, we should file a ticket against the Stylesheets so that the Schematron constraints expressed inside an `<attDef>` get expressed in the RELAX NG inside the corresponding `<attribute>`.
The XSLT which generates the tei_customization.odd file has a problem starting here:
TEI/P5/Utilities/TEI-to-tei_customization.xslt
Line 852 in be21c21
If you use the schema in Oxygen to validate a file, you'll get an error as soon as Oxygen tries to compile the Schematron from the RNG file to XSLT in the background. The error is:
I think the reason is that the Schematron rule is being created here in the context of the
<attDef>
of@except
, and this line tries to execute in that context:<sch:let name="exceptions" value="tokenize( ., '\s+' )"/>
I have a suspicion that such an expression can only be executed in the context of an element, not an attribute, so the variable doesn't get created properly and the subsequent operations relying on it fail. I think in the RNG it ends up being in the context of the parent
<moduleRef>
element.Assigning this to @sydb because he'll know exactly what to do. To test the fix, commit, wait for the build process to complete through to the bleeding-edge plugin, update your plugin, then create a File / New using the TEI for TEI Customizations template, and validate the resulting file.
The text was updated successfully, but these errors were encountered: