blob: 7c67b316ddbcb4d04f50a3829be75c34f9279fb0 [file] [log] [blame]
<?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "./dtd/document.dtd">
<s1 title="&XercesCName; Sample 9: EnumVal">
<s2 title="EnumVal">
<p>EnumVal shows how to enumerate the markup decls in a DTD Grammar.</p>
<s3 title="Running EnumVal">
<p>This program parses the specified XML file, then shows how to
enumerate the contents of the DTD Grammar.</p>
<source>
Usage:
EnumVal &lt;XML file&gt;
This program parses the specified XML file, then shows how to
enumerate the contents of the DTD Grammar. Essentially,
shows how one can access the DTD information stored in internal
data structures.
</source>
<p>Here is a sample output from EnumVal</p>
<source>cd &XercesCInstallDir;-linux/samples/data
EnumVal personal.xml
ELEMENTS:
----------------------------
Name: personnel
Content Model: (person)+
Name: person
Content Model: (name,email*,url*,link?)
Attributes:
Name:id, Type: ID
Name: name
Content Model: (#PCDATA|family|given)*
Name: email
Content Model: (#PCDATA)*
Name: url
Content Model: EMPTY
Attributes:
Name:href, Type: CDATA
Name: link
Content Model: EMPTY
Attributes:
Name:subordinates, Type: IDREF(S)
Name:manager, Type: IDREF(S)
Name: family
Content Model: (#PCDATA)*
Name: given
Content Model: (#PCDATA)*</source>
</s3>
</s2>
</s1>