<?xml version="1.0" standalone="no"?>
<!--
 * Copyright 1999-2005 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
-->

<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd"
[
<!ENTITY % PROJECT-ENTITIES PUBLIC
   "-//Xerces-P//Xerces-P ENTITIES V1.0//EN//XML"
   "project-entities.ent">
%PROJECT-ENTITIES;
]>
<document> 
  <header> 
    <title>&PROJECT_NAME; Sample: EnumVal</title> 
  </header> 
  <body> 

<section>
<title>Sample: EnumVal</title>

    <section>
<title>EnumVal</title>
        <p>EnumVal shows how to enumerate the markup decls in a DTD Grammar.</p>

        <section>
<title>Running EnumVal</title>
          <p>This program parses the specified XML file, then shows how to
            enumerate the contents of the DTD Grammar.</p>
<source>
Usage:
    perl EnumVal.pl &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 samples
perl EnumVal.pl personal.xml

Element Name: personnel, Content Model: (person)+
Element Name: person, Content Model: (name,email*,url*,link?)
	attribute Name: id, Type: ID
Element Name: name, Content Model: (#PCDATA|family|given)*
Element Name: email, Content Model: (#PCDATA)
Element Name: url, Content Model: EMPTY
	attribute Name: href, Type: CDATA
Element Name: link, Content Model: EMPTY
	attribute Name: subordinates, Type: IDREF(S)
	attribute Name: manager, Type: IDREF(S)
Element Name: family, Content Model: (#PCDATA)
Element Name: given, Content Model: (#PCDATA)
personal.xml: duration:  0 wallclock secs ( 0.02 usr +  0.00 sys =  0.02 CPU)
</source>
        </section>
    </section>
</section>
</body>
</document>