Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Relax NG question: extending an enumeration list?

From: "Costello, Roger L." <costello@-----.--->
To: <xml-dev@-----.---.--->
Date: 5/5/2008 2:19:00 PM
Hi Folks,

Is there a way, in Relax NG, to extend an enumeration list?

For example, here is a schema with an enumeration list:

--------------------------------------------
Color.rng
--------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
    <start>
        <element name="Color">
            <ref name="ColorDefn" />
        </element>
    </start>
    <define name="ColorDefn">
        <choice>
            <value>white</value>
            <value>grey</value>
            <value>blue</value>
        </choice>
    </define>
</grammar>

I would like to create another schema that imports Color.rng and
extends its enumeration list.  Here is my (incorrect) attempt:

--------------------------------------------
Color-ext.rng
--------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0">

    <include href="Color.rng" />

    <define name="ColorDefn" combine="interleave">
        <choice>
            <value>green</value>
            <value>purple</value>
        </choice>
    </define>
</grammar>

What is the correct way of doing it (if it's possible)?

Thanks.

/Roger


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent