[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

The DTD summary: the road not taken

  • From: John Cowan <johnwcowan@gmail.com>
  • To: xml-dev <xml-dev@lists.xml.org>
  • Date: Mon, 12 Feb 2018 01:03:30 -0500

The DTD summary: the road not taken
I decided to look past the 1998 1st Edition of XML back to the first draft, internally version 0.01, in 1996 to see what was in that draft that was later removed.  The most interesting lost feature was the DTD summary, a set of processing instructions with a target of "XML" that provided a sort of minimal DTD with only those features that would (to speak anachronistically) affect either parsing or the Infoset.  In addition, empty elements could be expressed by a start-tag rather than an (XML) empty-tag, provided the element was declared empty in either the DTD or the DTD summary.

Here's the text of the section describing the DTD summary declarations.  Such declarations could appear in place of a DOCTYPE declaration.

3.5 Partial DTD Information

The prolog of an XML document may contain an abbreviated summary of the DTD for the convenience of non-validating processors.

< 25 DTD summary >
DtdSummary::=(EmptyInfo | TextInfo | NoText | IdInfo | DefaultInfo)*
EmptyInfo::='<?XML' S 'empty' S 'names' Eq QuotedNames S? '?>'
TextInfo::='<?XML' S 'text' S 'names' Eq QuotedNames S? '?>'
NoText::='<?XML' S 'notext' S 'names' Eq QuotedNames S? '?>'
IdInfo::='<?XML' S 'idinfo' S
'ids' Eq QuotedPairs S
'refs' Eq QuotedPairs S? '?>'
QuotedPairs::='"' Pairs '"' | "'" Pairs "'"
Pairs::=('*' | Name) S Name (S ('*' | Name) S Name)*
DefaultInfo::='<?XML' S 'default' Name (S Name Eq Literal)* S? '?>'

The empty, text, and notext declarations give, respectively, lists of element types declared as empty, mixed-content, or element-content elements. The idinfo declaration lists attributes declared as id or idref(s) (in the ids and refs values, respectively). Each attribute name is given as an element-attribute pair; an asterisk matches all element types which have attributes of the given name. The default declaration specifies default values for the attributes of a given element type.

For example:

<?XML empty names="ptr xptr pb" ?>
<?XML notext names="div0 div1 div2 div3 list" ?>
<?XML text names="p emph q title hi" ?>
<?XML idinfo ids='* id' refs='* target * targets' ?>
<?XML default div type='section' ?>

Elements not listed as notext are implicitly declared as text elements; the text declaration is thus not strictly necessary.




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.