468,247 Members | 1,331 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,247 developers. It's quick & easy.

How do I reference a definition and at the same time modify it?

New RELAX NG user here. So let's say I have the following definitions
in my RELAX NG schema:

<define name="DefineElementA">
<element name="ElementA">
<interleave>

<optional>
<element name="ElementB">
<text/>
</element>
</optional>

<optional>
<element name="ElementC">
<text/>
</element>
</optional>

<optional>
<element name="ElementD">
<text/>
</element>
</optional>

</interleave>
</element>
</define>

<define name="DefineElementE">
<interleave>
<ref name="DefineElementA"/>

<optional>
<element name="ElementF">
<text/>
</element>
</optional>

</interleave>
</define>

I want the definition "DefineElementE" to reference the definition
"DefineElementA" like above, but I also want to change the referenced
definition in the context of "DefineElementE" so that element
"ElementD" is required. ElementE is sort of like a subclass of
ElementA: it inherits all of ElementA's child elements. Simply
duplicating ElementA's definition in ElementE and making ElementD
required would break inheritance. Is there another way?

William Beaumont
Jun 27 '08 #1
0 1020

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

14 posts views Thread by dumboo | last post: by
41 posts views Thread by Berk Birand | last post: by
7 posts views Thread by Richard Cavell | last post: by
4 posts views Thread by z_learning_tester | last post: by
4 posts views Thread by dhnriverside | last post: by
51 posts views Thread by Kuku | last post: by
3 posts views Thread by sisqorap | last post: by
12 posts views Thread by Bryan Parkoff | last post: by
275 posts views Thread by Astley Le Jasper | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.