我有要求用户根据@base属性制作专门化属性@ a,@ b,@ c。而@a和@b适用于所有元素,但对于@c而言,仅适用于<fig>
元素。 OASIS方案(DTD)中存在元素<fig>
,它不是我的专业元素。属性专门化和约束模块
据我所知,可以通过下面的RELAX NG编码完成属性专门化。
<define name="aAtt-d-attribute">
<optional>
<attribute name="a">
<a:documentation>Specifies @a to which an element applies.
</a:documentation>
</attribute>
</optional>
</define>
<define name="base-attribute-extensions" combine="interleave">
<ref name="aAtt-d-attribute"/>
</define>
但我不知道如何在RELAX NG中为@c编写约束模块并将它们集成到shell .rng文件中。请给我你的建议。
最重要的一点是通过最低限度的符合方式为现有的(OASIS TC提供的)元素添加新的属性。最初的讨论可以在[https://groups.yahoo.com/neo/groups/dita-users/conversations/topics/39272](https://groups.yahoo.com/neo/groups/dita-users)中找到。/conversations/topics/39272) – tmakita