Closed martindholmes closed 2 months ago
The only child of <moduleRef>
is <content>
, which is used to specify RELAX NG code that is also used in the output schema, in addition to the RELAX NG found in the <content>
at the end of @url
, if any. This template matches that <content>
, and copies over both chunks of RELAX NG.
I suppose there is a worry that the <content>
has not RELAX NG, but rather TEI descendants. (There are no extant cases of this in the entire atop/ or TEI/P5/ directories, but it could happen.)
We should either
<content>
to only RELAX NG children.<tei:*>
, not copy it, and issue a warning instead.<tei:*>
in a <content>
in a <moduleRef>
the output schema will be broken without warning.I like (1) the most and hate (3). I like (1) so much better, I just thought “why didn’t we already do that?” to myself and then checked. I discovered two things.
/tei:moduleRef/tei:content
to RELAX NG (either <rng:*>
or <a:*>
).HOWEVER, that constraint ("only_rng_in_moduleRef_content") does not have an <sch:rule>
, which it now needs. Probably true of other constraint specifications in that schema …
Issue is not an issue, and tangential fix applied.
This template from the transpile.xslt:
appears to copy the TEI content element which is a child of moduleRef to the RNG output. @HelenaSabel and I don't quite understand what's happening here. We need to determine if this is what's happening, and if so, what should happen instead; and we should have more tests for checking moduleRef handling at the transpile stage.