Transpiling MEI to RELAX NG
Day 1 of @teimec2023@hcommons.social, Workshop on integrating TEI and MEI. Found not so much a bug in our ODD to RELAX NG transpiler but problems in the MEI customization.
- Defining attributes with "prefixed"
@ident
s but no@ns
<attDef ident="xlink:role" usage="opt"> <desc>Characterization of the relationship between resources. The value of the role attribute must be a URI.</desc> <datatype> <rng:ref name="data.URI"/> </datatype> </attDef>
Technically this is valid with regards to the TEI schema but poses the question to which namespace URI the prefix xlink:
is supposed to be bound. All those attributes specifications should add a @ns
with the value of http://www.w3.org/1999/xlink
.
- Using mixing ODD and RELAX NG specification elements
In the example above the datatype of the @xlink:role
is defined by a reference to a RELAX NG pattern. The MEI customization contains a related macro specification of the same name.
<macroSpec ident="data.URI" module="MEI" type="dt"> <desc>A Uniform Resource Identifier, see [RFC2396].</desc> <content> <rng:data type="anyURI"/> </content> </macroSpec>
The connection between these two specification elements is only implied. It presupposes a) the macroSpec
to be transpiled to a RELAX NG pattern and b) a TEI ODD to RELAX NG transpiler to keep specifications even if they are not used.
The latter problem will be solved with a move to pure ODD. Both issues need to be solved to make MEI independent of a particular TEI ODD processing software.