XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Side-by-side comparison of XML Schema and Relax NG

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]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS