NAME
SGML::DTDParse - Parse an SGML or XML DTD
SYNOPSIS
use SGML::DTDParse;print "This is DTDParse v$SGML::DTDParse::VERSION\n";
DESCRIPTION
The DTDParse collection is a set of Perl modules and scripts for manipulating SGML an XML Document Type Definitions (DTDs). DTDParse is designed primarily to aid in the understanding and documentation of DTDs.
Typical usage of this package is as follows:
- 1.
-
Parse the DTD with dtdparse. This produces an XML representation of the DTD. This representation exposes both the logical structure of the DTD (the actual meta-structure of its grove) and the organizational structure of the DTD (the declarations and parameter entities) that comprise its textual form.
- 2.
-
Manipulate the XML document produced by dtdparse to do whatever you want. DTDParse is shipped with several programs that demonstrate various capabilities, including dtdformat which can produce HTML or DocBook <http://www.oasis-open.org/docbook/> RefEntry pages for each element and parameter entity in the DTD.
DTDParse XML DTD
The following is the XML DTD for XML documents created with dtdparse (the DTD is also provided in the file "etc/dtd.dtd" of the DTDParse distribution):
<!-- This is the DTD for the documents produced by DTDParse.The public identifier for this DTD is:"-//Norman Walsh//DTD DTDParse V2.0//EN"--><!ELEMENT dtd (notation|entity|element|attlist)+><!ATTLIST dtdversion CDATA #REQUIREDunexpanded CDATA #IMPLIEDtitle CDATA #IMPLIEDnamecase-general CDATA #IMPLIEDnamecase-entity CDATA #IMPLIEDxml CDATA #IMPLIEDsystem-id CDATA #IMPLIEDpublic-id CDATA #IMPLIEDdeclaration CDATA #IMPLIEDcreated-by CDATA #IMPLIEDcreated-on CDATA #IMPLIED><!ELEMENT notation EMPTY><!ATTLIST notationname CDATA #REQUIREDpublic CDATA #IMPLIEDsystem CDATA #IMPLIED><!ELEMENT entity (text-expanded?, text?)><!ATTLIST entityname CDATA #REQUIREDtype CDATA #REQUIREDnotation CDATA #IMPLIEDpublic CDATA #IMPLIEDsystem CDATA #IMPLIED><!ELEMENT text (#PCDATA)*><!ELEMENT text-expanded (#PCDATA)*><!ELEMENT element (content-model-expanded, content-model?,inclusions?, exclusions?)><!ATTLIST elementname CDATA #REQUIREDstagm CDATA #IMPLIEDetagm CDATA #IMPLIEDcontent-type (element|mixed|cdata|empty|rcdata) #IMPLIED><!ENTITY % cm.mix "sequence-group|or-group|and-group|element-name|parament-name|pcdata|cdata|rcdata|empty"><!ELEMENT content-model-expanded (%cm.mix;)><!ELEMENT content-model (%cm.mix;)><!ELEMENT inclusions (%cm.mix;)><!ELEMENT exclusions (%cm.mix;)><!ELEMENT sequence-group (%cm.mix;)*><!ATTLIST sequence-groupoccurrence CDATA #IMPLIED><!ELEMENT or-group (%cm.mix;)*><!ATTLIST or-groupoccurrence CDATA #IMPLIED><!ELEMENT and-group (%cm.mix;)*><!ATTLIST and-groupoccurrence CDATA #IMPLIED><!ELEMENT element-name EMPTY><!ATTLIST element-namename CDATA #REQUIREDoccurrence CDATA #IMPLIED><!ELEMENT parament-name EMPTY><!ATTLIST parament-namename CDATA #REQUIRED><!ELEMENT empty EMPTY><!ELEMENT pcdata EMPTY><!ELEMENT cdata EMPTY><!ELEMENT rcdata EMPTY><!ELEMENT attlist (attdecl, attribute+)><!ATTLIST attlistname CDATA #REQUIRED><!ELEMENT attdecl (#PCDATA)><!ELEMENT attribute EMPTY><!ATTLIST attributename CDATA #REQUIREDtype CDATA #REQUIREDenumeration (yes|no|notation) #IMPLIEDvalue CDATA #REQUIREDdefault CDATA #REQUIRED>
SEE ALSO
dtdparse, dtdformat, dtddiff, dtdflatten, SGML::DTDParse::DTD
PREREQUISITES
The prerequisites listed are for all modules and scripts:
Getopt::Long, Text::DelimMatch, XML::Parser, XML::DOM
For prerequisites that apply for a specific script or module, see the individual scripts' and modules' reference pages.
AVAILABILITY
<http://dtdparse.sourceforge.net/>
AUTHORS
DTDParse package originally developed by Norman Walsh, <[email protected]>.
Earl Hood, <[email protected]>, picked up support and maintenance.
COPYRIGHT AND LICENSE
Copyright (C) 1999-2001, 2003 Norman WalshCopyright (C) 2005, Earl Hood
DTDParse may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the DTDParse distribution.