[Home] [By Thread] [By Date] [Recent Entries]

  • From: "Costello, Roger L." <costello@m...>
  • To: <xml-dev@l...>
  • Date: Mon, 5 May 2008 10:17:47 -0400


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


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member