XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
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]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS