Text Data Description Languages
Developed in SGML
See movies.dtd
mechanism to identify names uniquely
See Bray's example
3-part specification: primer, structures, datatypes
See movies.xsd
ISO standard (Dec. 2003), developed by James Clark and
Murata Makoto through OASIS
Two syntaxes:
XML Syntax
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
<start>
<ref name="AddressBook"/>
</start>
<define name="AddressBook">
<zeroOrMore>
<ref name="Card"/>
</zeroOrMore>
</define>
<define name="Card">
<element
name="name">
<text/>
</element>
<element name="email">
<attribute name "workOrHome">
<choice>
<value>work</value>
<value>home</value>
</choice>
</attribute>
<text/>
</element>
<optional>
<element
name="note">
<text/>
</element>
</optional>
</define>
</grammar>
Compact Syntax
grammar {
start = AddressBook
AddressBook = element addressBook { Card* }
Card = element card { Name, Email, element note { text} ? }
Name = element name { text }
Email = element email { attribute workOrHome { ("work" | "home") }, text
}
}
Relax NG specification in Relax NG
Querying XML, Chapter 4, 5, 7.3, 7.4
|
|
|
|
||
|