[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Side-by-side comparison of XML Schema and Relax NG
- From: "Costello, Roger L." <costello@mitre.org>
- To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
- 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]