Closed Bpolitycki closed 1 year ago
Hi @Bpolitycki I'm thinking the issue might be the combination of mode="replace"
on the classes spec with mode="change"
on the <attDef>
elements. Replace mode I think suggests you're intending to fully redefine the classes--and I am thinking that is probably more than you need here? If you're going to change the rules for particular attributes in the class, the mode="change" is probably sufficient.
Thanks @ebeshero for your quick reply. Just some additional thoughts on this:
elementSpec
s – for example<elementSpec xmlns="http://www.tei-c.org/ns/1.0" ident="width" module="msdescription" mode="change">
<!--- ... --->
<memberOf key="model.dimLike"/>
<memberOf key="model.measureLike"/>
<memberOf key="att.dimensions"/>
</classes>
<content>
<empty/>
</content>
<attList>
<attDef ident="unit" mode="change" usage="req">
<datatype>
<dataRef name="string" restriction="test-width"/>
</datatype>
</attDef>
<attDef ident="quantity" mode="change" usage="req"/>
</attList>
</elementSpec>
classes
-definition from my initial example, then the compiled RNG is ok <attDef ident="ref" mode="change"/>
the compiled RNG contains a duplicated <ref name="att.canonical.attribute.ref"/>
For me this problem seems to be somewhat specific to att.canonical
and it does not seem possible to make any changes. Any ideas?
I may not have time to dive into this deeply right now, but at first blush this certainly smells somewhat similar to at least TEIC/Stylesheets#237, TEIC/Stylesheets#370, TEIC/Stylesheets#371, and TEIC/Stylesheets#376. There is something screwy going on with definitions of attributes from classes & locally.
Ack! Sorry. False alarm. It is not possible to use both att.naming and att.canonical, because att.naming already includes att.canonical.
Thus just removing the <memeberOf key="att.canonical"/>
solves the problem.
Ack! Sorry. False alarm. It is not possible to use both att.naming and att.canonical, because att.naming already includes att.canonical.
Oh man! Thanks a lot!
Wer lesen kann, ist klar im Vorteil ... ;)
I am trying to change attributes which are members of
att.canonical
in anelementSpec
. So my spec looks like:Which produces the following RelaxNG-Output:
I would expect, that the attributes don't get duplicated (as all the other attributes changed the same way).
I've used the TEI-Stylesheets Branch
release-7.54.0
.