Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xml-dev] Relax NG question: extending an enumeration list?

From: Dave Pawson <davep@-------.--.-->
To: "Costello, Roger L." <costello@-----.--->
Date: 5/5/2008 4:11:00 PM
Costello, Roger L. wrote:
> 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)?  <define name="Month">
     <a:documentation>
       <html:p>Element </html:p>
     </a:documentation>
     <choice>
       <value>Jan</value>
       <value>Feb</value>
       <value>Mar</value>
       <value>Apr</value>
       <value>May</value>
       <value>Jun</value>
       <value>Jul</value>
       <value>Aug</value>
       <value>Sep</value>
       <value>Oct</value>
       <value>Nov</value>
       <value>Dec</value>
     </choice>
   </define>


Is my 'exampler'

HTH


regards

-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk


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