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

  • From: "Costello, Roger L." <costello@m...>
  • To: "xml-dev@l..." <xml-dev@l...>
  • Date: Fri, 24 Feb 2012 16:30:59 +0000

Hi Folks,

Below are two implementations of this data model:

     The content of a Book element is one or more 
     Title elements.  The content of each Title element 
     is text/string.

The data model is first implemented using this XML markup language: XML Schema.

Next, the data model is implemented using this XML markup language: Relax NG.

----------------
XML Schema
----------------
<schema xmlns="http://www.w3.org/2001/XMLSchema">
    <element name="Book">
        <complexType>
            <sequence>
                <element name="Title" maxOccurs="unbounded" type="string" />
            </sequence>
        </complexType>
    </element>
</schema>

-----------
Relax NG
-----------
<element name="Book" 
                    xmlns="http://relaxng.org/ns/structure/1.0">
    <oneOrMore>
        <element name="Title"><text/></element>
    </oneOrMore>
</element>

Do you have other examples of side-by-side comparisons of XSD and RNG?

/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