# comment this entity for publication # uncomment the following entity for publication, and change the date # in entitieswd.dtd # # Titles # Latest version links. don't touch # XML Namespaces used in the drafts # # # Misc entities. Feel free to add more # Acknowledgements # ............................................................... # XML specification DTD ......................................... # ............................................................... # $Id: xmlspec.rnc,v 1.2 2006/04/21 16:01:46 hugo Exp $ # TYPICAL INVOCATION: # # # # PURPOSE: # This XML DTD is for W3C specifications and other technical reports. # It is based in part on the TEI Lite and Sweb DTDs. # # DEPENDENCIES: # None. # # CHANGE HISTORY: # The list of changes is at the end of the DTD. # # For all details, see the design report at: # # # # # #2001-10-08: nwalsh: Added local.arg.att and local.proto.att # # #2002-08-14: nwalsh: Published V2.2 # # Added marked sections around element and attlist declarations and # added the altlocs element # # Search this file for "#" in the first column to see change history # comments. To find changes made this time, search for "2000-03-07". # # MAINTAINERS: # Norman Walsh # Sun Microsystems, Inc. # Norman.Walsh@Sun.COM # voice: +1 413 256 6985 # fax: +1 413 256 6985 # # Eve Maler # Sun Microsystems, Inc. # elm@east.sun.com # voice: +1 781 442 3190 # fax: +1 781 442 1437 # ............................................................... # Entities for characters and symbols ........................... # ............................................................... # #1998-03-10: maler: Added “ and ”. # # Used 8879:1986-compatible decimal character # # references. # # Merged charent.mod file back into main file. # #1998-05-14: maler: Fixed ldquo and rdquo. Gave mdash a real number. # #1998-12-03: maler: Escaped the leading ampersands. # # # # # # ............................................................... # Entities for classes of standalone elements ................... # ............................................................... # #1997-10-16: maler: Added table to %illus.class;. # #1997-11-28: maler: Added htable to %illus.class;. # #1997-12-29: maler: IGNOREd table. # #1998-03-10: maler: Removed SGML Open-specific %illus.class;. # # Added "local" entities for customization. # #1998-05-14: maler: Added issue to %note.class;. # # Removed %[local.]statusp.class;. # #1998-05-21: maler: Added constraintnote to %note.class;. # #1998-08-22: maler: Changed htable to table in %illus.class;. # # Added definitions to %illus.class;. # #2000-03-07: maler: Added proto and example to %illus.class;. namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" namespace xlink = "http://www.w3.org/1999/xlink" local.p.class = notAllowed p.class = p | local.p.class local.list.class = notAllowed list.class = ulist | olist | slist | glist | local.list.class local.speclist.class = notAllowed speclist.class = orglist | blist | local.speclist.class local.note.class = notAllowed note.class = note | issue | wfcnote | vcnote | constraintnote | local.note.class local.illus.class = notAllowed illus.class = eg | graphic | scrap | table | definitions | proto | example | local.illus.class # ............................................................... # Entities for classes of phrase-level elements ................. # ............................................................... # #1997-12-29: maler: Added xspecref to %ref.class;. # #1998-03-10: maler: Added %ednote.class;. # # Added "local" entities for customization. # #2000-03-07: maler: Added function, var, el, att, and attval to # # %tech.class;. # # Added sub, sup, and phrase to %emph.class;. local.annot.class = notAllowed annot.class = footnote | local.annot.class local.termdef.class = notAllowed termdef.class = termdef | term | local.termdef.class local.emph.class = notAllowed emph.class = emph | phrase | quote | sub | sup | b | u | i | local.emph.class b = element b { b.attlist, (text | u | i)* } b.attlist &= empty i = element i { i.attlist, (text | b | u)* } i.attlist &= empty u = element u { u.attlist, (text | b | i)* } u.attlist &= empty local.ref.class = notAllowed ref.class = bibref | specref | termref | titleref | xspecref | xtermref | local.ref.class local.loc.class = notAllowed loc.class = loc | local.loc.class local.tech.class = notAllowed tech.class = kw | nt | xnt | code | function | var | el | att | attval | local.tech.class local.ednote.class = notAllowed ednote.class = ednote | local.ednote.class # ............................................................... # Entities for mixtures of standalone elements .................. # ............................................................... # #1997-09-30: maler: Created %p.mix; to eliminate p from self. # #1997-09-30: maler: Added %speclist.class; to %obj.mix; and %p.mix;. # #1997-09-30: maler: Added %note.class; to %obj.mix; and %p.mix;. # #1997-10-16: maler: Created %entry.mix;. Note that some elements # # left out here are still allowed in termdef, # # which entry can contain through %p.pcd.mix;. # #1997-11-28: maler: Added %p.class; to %statusobj.mix;. # #1998-03-10: maler: Added %ednote.class; to all mixtures, except # # %p.mix; and %statusobj.mix;, because paragraphs # # and status paragraphs will contain ednote # # through %p.pcd.mix;. # #1998-03-23: maler: Added %termdef.mix; (broken out from # # %termdef.pcd.mix;). # #1998-05-14: maler: Removed %statusobj.mix; and all mentions of # # %statusp.mix;. div.mix = p.class | list.class | speclist.class | note.class | illus.class | ednote.class obj.mix = p.class | list.class | speclist.class | note.class | illus.class | ednote.class p.mix = list.class | speclist.class | note.class | illus.class hdr.mix = p.class | list.class | ednote.class termdef.mix = note.class | illus.class # ............................................................... # Entities for mixtures of #PCDATA and phrase-level elements .... # ............................................................... # Note that %termdef.pcd.mix contains %note.class; # and %illus.class;, considered standalone elements. # #1997-09-30: maler: Added scrap and %note.class; to %termdef.pcd.mix;. # #1997-11-28: maler: Added %loc.class; to %p.pcd.mix;. # #1998-03-10: maler: Added %ednote.class; to all mixtures. # #1998-03-23: maler: Moved some %termdef.pcd.mix; stuff out to # # %termdef.mix;. # #1998-05-14: maler: Removed %statusp.pcd.mix;. # #1998-05-21: maler: Added constraint element to %eg.pcd.mix;. # #1999-07-02: maler: Added %loc.class; to %head.pcd.mix;, # # %label.pcd.mix;, %eg.pcd.mix;, %termdef.pcd.mix;, # # %tech.pcd.mix; (net: all PCD mixes have it). # # Removed unused %loc.pcd.mix;. p.pcd.mix = text | annot.class | termdef.class | emph.class | ref.class | tech.class | loc.class | ednote.class head.pcd.mix = text | annot.class | emph.class | tech.class | loc.class | ednote.class label.pcd.mix = text | annot.class | termdef.class | emph.class | tech.class | loc.class | ednote.class eg.pcd.mix = text | annot.class | emph.class | loc.class | ednote.class | constraint termdef.pcd.mix = text | term | emph.class | ref.class | tech.class | loc.class | ednote.class bibl.pcd.mix = text | emph.class | ref.class | loc.class | ednote.class tech.pcd.mix = text | loc.class | ednote.class | emph.class # ............................................................... # Entities for customizable content models ...................... # ............................................................... # #1998-03-10: maler: Added customization entities. # #1998-05-14: maler: Allowed prevlocs and latestloc in either order. # #1999-07-02: maler: Made version optional; added copyright element. # #2000-03-07: maler: Allowed status and abstract in opposite order. spec.mdl = header, front?, body, back? header.mdl = title, subtitle?, version?, w3c-designation, w3c-doctype, pubdate, notice*, publoc, altlocs?, ((prevlocs, latestloc?) | (latestloc, prevlocs?))?, authlist, copyright?, errata?, ((status, abstract) | (abstract, status)), pubstmt?, sourcedesc?, langusage, revisiondesc errata = element errata { errata.attlist, text } errata.attlist &= empty pubdate.mdl = day?, month, year # ............................................................... # Entities for common attributes ................................ # ............................................................... # #2000-03-07: maler: Added %argtypes;. # argtypes: # Values for function prototype argument datatypes. argtypes = "boolean" | "expression" | "location-set" | "node-set" | "number" | "object" | "point" | "range" | "string" # key attribute: # Optionally provides a sorting or indexing key, for cases when # the element content is inappropriate for this purpose. key.att = attribute key { text }? # def attribute: # Points to the element where the relevant definition can be # found, using the IDREF mechanism. %def.att; is for optional # def attributes, and %def-req.att; is for required def # attributes. def-req.att = attribute def { xsd:IDREF } # ref attribute: # Points to the element where more information can be found, # using the IDREF mechanism. %ref.att; is for optional # ref attributes, and %ref-req.att; is for required ref # attributes. ref-req.att = attribute ref { xsd:IDREF } # #1998-03-23: maler: Added show and actuate attributes to href. # # Added semi-common xml:space attribute. # #1998-08-22: maler: Used new xlink:form and #IMPLIED features. # #1999-07-02: maler: Reorganized XLink-related entities completely; # # added xmlns:xlink attribute to the mix. # #2000-03-07: maler: Updated XLink usage to February 2000 draft, # # except that href still has no namespace prefix. # xmlns:xlink and xlink:type attributes: # xmlns:xlink declares the association of the xlink prefix # with the namespace created by the XLink specification. # xlink:type identifies an element as an XLink "simple" linking # element. simple-xlink.att = [ a:defaultValue = "simple" ] attribute xlink:type { string "simple" }? # href attributes: # The href attribute locates the remote-resource half of a # simple link; the element on which the href appears is the # local-resource half. Some elements are usable links only if # the author chooses to supply a functional href. The attribute # name should really be xlink:href, but is kept without the # prefix for now in order to be backwards-compatible. href.att = attribute href { text }? href-req.att = attribute href { text } # xlink:show and xlink:actuate attributes: # These attributes offer instructions to the display engine # about how to handle traversal to resource indicated by an # href locator. auto-embed.att = [ a:defaultValue = "embed" ] attribute xlink:show { string "embed" }?, [ a:defaultValue = "onLoad" ] attribute xlink:actuate { string "onLoad" }? user-replace.att = [ a:defaultValue = "replace" ] attribute xlink:show { string "replace" }?, [ a:defaultValue = "onRequest" ] attribute xlink:actuate { string "onRequest" }? user-new.att = [ a:defaultValue = "new" ] attribute xlink:show { string "new" }?, [ a:defaultValue = "onRequest" ] attribute xlink:actuate { string "onRequest" }? # xml:space attribute: # Indicates that the element contains whitespace that the # formatter or other application should retain, as appropriate # to its function. xmlspace.att = [ a:defaultValue = "preserve" ] attribute xml:space { "preserve" }? # #2000-03-07: maler: Added common diff attribute. Made %role.att;. # diff attribute: # Indicates in what way the element has changed. When a value # is not provided, that subelement should inherit a value from # its parent. If the root element has no value supplied, # assume "off". diff.att = attribute diff { "chg" | "add" | "del" | "off" }? # role attribute: # Extends the useful life of the DTD by allowing authors to # make a subtype of any element. No default. role.att = attribute role { xsd:NMTOKEN }? # Common attributes: # Every element has an ID attribute for links, a role # attribute, and a diff attribute. %common.att; is for # common attributes where the ID is optional, and # %common-idreq.att; is for common attributes where the # ID is required. common.att = attribute id { xsd:ID }?, role.att, diff.att common-idreq.att = attribute id { xsd:ID }, role.att, diff.att # ............................................................... # Common elements ............................................... # ............................................................... # head: Title on divisions, productions, and the like head = element head { head.attlist, head.pcd.mix* } head.attlist &= common.att # ............................................................... # Major specification structure ................................. # ............................................................... # #1998-03-10: maler: Made spec content model easily customizable. # #1999-07-02: maler: Added doctype atts and status att. # #2000-03-07: maler: Added cr, issues, and dispcmts to w3c-doctype. spec = element spec { spec.attlist, spec.mdl } # w3c-doctype attributes: # Indicates the type of document, so that the appropriate # stylesheet or workflow routing can be applied. Should # *not* generate any text (such as the "REC-" or "NOTE-" # prefix on the W3C designation content). No default. If # w3c-doctype is "other", other-doctype should be filled in. # # status attribute: # Indicates the stage of review of the document. May affect # the stylesheet's treatment of ednotes (e.g., whether to # output them). No default. local.spec.att = empty spec.attlist &= common.att, local.spec.att, attribute w3c-doctype { "cr" | "dispcmts" | "issues" | "note" | "wgnote" | "other" | "pr" | "rec" | "wd" }?, attribute other-doctype { text }?, attribute status { "int-review" | "ext-review" | "final" }?, attribute shortname { text }? front = element front { front.attlist, div1+ } front.attlist &= common.att body = element body { body.attlist, div1+ } body.attlist &= common.att # #1997-09-30: maler: Added inform-div1 to back content. back = element back { back.attlist, ((div1+, inform-div1*) | inform-div1+) } back.attlist &= common.att div1 = element div1 { div1.attlist, head, div.mix*, div2* } div1.attlist &= common.att # #1997-09-30: maler: Added inform-div1 declarations. # #2000-03-07: maler: Added div5 level. # inform-div1: Non-normative division in back matter inform-div1 = element inform-div1 { inform-div1.attlist, head, div.mix*, div2* } inform-div1.attlist &= common.att div2 = element div2 { div2.attlist, head, div.mix*, div3* } div2.attlist &= common.att div3 = element div3 { div3.attlist, head, div.mix*, div4* } div3.attlist &= common.att div4 = element div4 { div4.attlist, head, div.mix*, div5* } div4.attlist &= common.att div5 = element div5 { div5.attlist, head, div.mix* } div5.attlist &= common.att # ............................................................... # Specification header .......................................... # ............................................................... # #1998-03-10: maler: Made header content model easily customizable. header = element header { header.attlist, header.mdl } header.attlist &= common.att # Example of title: "Extensible Cheese Language (XCL)" title = element title { title.attlist, text } title.attlist &= common.att # Example of subtitle: "A Cheesy Specification" subtitle = element subtitle { subtitle.attlist, text } subtitle.attlist &= common.att # Example of version: "Version 666.0" version = element version { version.attlist, text } version.attlist &= common.att # Example of w3c-designation: "WD-xcl-19991231" w3c-designation = element w3c-designation { w3c-designation.attlist, text } w3c-designation.attlist &= common.att # Example of w3c-doctype: "W3C Working Draft" w3c-doctype = element w3c-doctype { w3c-doctype.attlist, text } w3c-doctype.attlist &= common.att # #1998-03-10: maler: Made pubdate content model easily customizable. pubdate = element pubdate { pubdate.attlist, pubdate.mdl } pubdate.attlist &= common.att day = element day { day.attlist, text } day.attlist &= common.att month = element month { month.attlist, text } month.attlist &= common.att year = element year { year.attlist, text } year.attlist &= common.att # #1999-07-02: maler: Declared copyright element. copyright = element copyright { copyright.attlist, hdr.mix+ } copyright.attlist &= common.att # Example of notice: "This draft is for public comment..." notice = element notice { notice.attlist, hdr.mix+ } notice.attlist &= common.att # #2000-03-07: maler: Broadened models of *loc to %p.pcd.mix;. publoc = element publoc { publoc.attlist, p.pcd.mix* } publoc.attlist &= common.att # #2002-08-15: nwalsh: Added altlocs element. # The semantics of the altlocs are equivalent to the Dublin Core relation element # with type="hasVersion". Each of the loc elements inside altlocs should identify # an alternate version of the resource described by the document, for example # HTML, XML, and PDF forms. altlocs = element altlocs { altlocs.attlist, loc+ } altlocs.attlist &= common.att prevlocs = element prevlocs { prevlocs.attlist, p.pcd.mix* } prevlocs.attlist &= common.att latestloc = element latestloc { latestloc.attlist, p.pcd.mix* } latestloc.attlist &= common.att # loc (defined in "Phrase-level elements" below) authlist = element authlist { authlist.attlist, author+ } authlist.attlist &= common.att # #1997-09-30: maler: Made affiliation optional. # #1998-03-10: maler: Made email optional. author = element author { author.attlist, name, affiliation?, email? } author.attlist &= common.att name = element name { name.attlist, text } name.attlist &= common.att, key.att affiliation = element affiliation { affiliation.attlist, text } affiliation.attlist &= common.att # #1999-07-02: maler: Added show/actuate attributes and default values. email = element email { email.attlist, text } # href attribute: # email functions as a hypertext reference through this # required attribute. Typically the reference would use # the mailto: scheme. E.g.: # # elm@arbortext.com email.attlist &= common.att, simple-xlink.att, href-req.att, user-new.att # #1998-05-15: maler: Changed status content from %statusobj.mix; # # to plain %obj.mix;. statusp is obsolete. status = element status { status.attlist, obj.mix+ } status.attlist &= common.att abstract = element abstract { abstract.attlist, hdr.mix* } abstract.attlist &= common.att pubstmt = element pubstmt { pubstmt.attlist, hdr.mix+ } pubstmt.attlist &= common.att sourcedesc = element sourcedesc { sourcedesc.attlist, hdr.mix+ } sourcedesc.attlist &= common.att langusage = element langusage { langusage.attlist, language+ } langusage.attlist &= common.att language = element language { language.attlist, text } language.attlist &= common.att revisiondesc = element revisiondesc { revisiondesc.attlist, hdr.mix+ } revisiondesc.attlist &= common.att # ............................................................... # Paragraph ..................................................... # ............................................................... # #1997-09-30: maler: Changed from %obj.mix; to %p.mix;. # #1997-12-29: maler: Changed order of %p.mix; and %p.pcd.mix; # # references. # #1997-12-29: maler: Changed order of %statusobj.mix; and # # %statusp.pcd.mix; references. # #1998-05-14: maler: Removed statusp declarations. p = element p { p.attlist, (p.pcd.mix | p.mix)* } p.attlist &= common.att # ............................................................... # Regular lists ................................................. # ............................................................... # ulist: Unordered list, typically bulleted. ulist = element ulist { ulist.attlist, item+ } # spacing attribute: # Use "normal" to get normal vertical spacing for items; # use "compact" to get less spacing. The default is dependent # on the stylesheet. ulist.attlist &= common.att, attribute spacing { "normal" | "compact" }? # olist: Ordered list, typically numbered. olist = element olist { olist.attlist, item+ } # spacing attribute: # Use "normal" to get normal vertical spacing for items; # use "compact" to get less spacing. The default is dependent # on the stylesheet. olist.attlist &= common.att, attribute spacing { "normal" | "compact" }? item = element item { item.attlist, obj.mix+ } item.attlist &= common.att # slist: Simple list, typically with no mark. slist = element slist { slist.attlist, sitem+ } slist.attlist &= common.att sitem = element sitem { sitem.attlist, p.pcd.mix* } sitem.attlist &= common.att # glist: Glossary list, typically two-column. glist = element glist { glist.attlist, gitem+ } glist.attlist &= common.att gitem = element gitem { gitem.attlist, label, def } gitem.attlist &= common.att label = element label { label.attlist, label.pcd.mix* } label.attlist &= common.att def = element def { def.attlist, obj.mix* } def.attlist &= common.att # ............................................................... # Special lists ................................................. # ............................................................... # blist: Bibliography list. blist = element blist { blist.attlist, bibl+ } blist.attlist &= common.att # #1999-07-02: maler: Added show/actuate attributes and default values. bibl = element bibl { bibl.attlist, bibl.pcd.mix* } # href attribute: # bibl optionally functions as a hypertext reference to the # referred-to resource through this attribute. E.g.: # # My Document bibl.attlist &= common.att, simple-xlink.att, href.att, user-replace.att, key.att # orglist: Organization member list. orglist = element orglist { orglist.attlist, member+ } orglist.attlist &= common.att # #1997-09-30: maler: Added optional affiliation. member = element member { member.attlist, name, affiliation?, role? } member.attlist &= common.att # name (defined in "Specification header" above) # affiliation (defined in "Specification header" above) role = element role { role.attlist, text } role.attlist &= common.att # ............................................................... # Notes ......................................................... # ............................................................... note = element note { note.attlist, obj.mix+ } note.attlist &= common.att # #1998-05-14: maler: Declared issue element. # #2000-03-07: maler: Added head, source, resolution, and status. issue = element issue { issue.attlist, head?, source*, obj.mix+, resolution? } # status attribute: # Indicates whether the issue is open or closed. Note that # the lack of a resolution element does not necessarily mean # that the issue is still open. issue.attlist &= attribute id { xsd:ID }, role.att, diff.att, [ a:defaultValue = "open" ] attribute status { "open" | "closed" }? source = element source { source.attlist, p.pcd.mix* } source.attlist &= common.att resolution = element resolution { resolution.attlist, obj.mix+ } resolution.attlist &= common.att # wfcnote: Well-formedness constraint note. wfcnote = element wfcnote { wfcnote.attlist, head, obj.mix+ } # ID attribute: # wfcnote must have an ID so that it can be pointed to # from a wfc element in a production. wfcnote.attlist &= common-idreq.att # vcnote: Validity constraint note. vcnote = element vcnote { vcnote.attlist, head, obj.mix+ } # ID attribute: # vcnote must have an ID so that it can be pointed to # from a vc element in a production. vcnote.attlist &= common-idreq.att # #1998-05-21: maler: Declared generic constraintnote element. # constraintnote: Generic constraint note. constraintnote = element constraintnote { constraintnote.attlist, head, obj.mix+ } # ID attribute: # constraintnote must have an ID so that it can be # pointed to from a constraint element in a production. # type attribute: # constraintnote must have a type value keyword so that # it can be correctly characterized in the specification. constraintnote.attlist &= common-idreq.att, attribute type { xsd:NMTOKEN } # ............................................................... # Basic display elements ........................................ # ............................................................... # #1998-03-23: maler: Added xml:space attribute. # eg: Example element, with whitespace respected. eg = element eg { eg.attlist, eg.pcd.mix* } eg.attlist &= common.att, xmlspace.att # #2000-03-07: maler: Removed the xml:attributes attribute. # # Added %local.graphic.att;. # graphic: Displayed graphic. Graphic data should be # displayed at the point where it is referenced. Not # actually conforming to XLink right now. graphic = element graphic { graphic.attlist, empty } # source attribute: # The graphic data must reside at the location pointed to. local.graphic.att = empty graphic.attlist &= common.att, simple-xlink.att, attribute source { text }, auto-embed.att, attribute alt { text }?, local.graphic.att # #2000-03-07: maler: Added proto element structure. # proto: Function prototype, in the XPath/XPointer style. proto = element proto { proto.attlist, arg* } local.proto.att = empty proto.attlist &= common.att, local.proto.att, attribute name { xsd:NMTOKEN }, attribute return-type { argtypes } local.arg.att = empty arg = element arg { arg.attlist, empty } arg.attlist &= common.att, local.arg.att, attribute type { argtypes }, attribute occur { "opt" | "req" }? # #2000-03-07: maler: Added example element. example = element example { example.attlist, head?, obj.mix+ } example.attlist &= common.att # ............................................................... # EBNF .......................................................... # ............................................................... # #1997-11-28: maler: Added prodgroup to scrap and defined it. # #1998-05-21: maler: Added constraint to prod. # #1999-07-02: maler: Added prodrecap to scrap; broadened scrap model. # # Added headstyle attribute to scrap. # scrap: Collection of EBNF language productions. scrap = element scrap { scrap.attlist, head, (prodgroup | prod | bnf | prodrecap)+ } # lang attribute: # The scrap can link to a description of the language used, # found in a language element in the header. # headstyle attribute: # Allows a scrap title to be suppressed from output. To be # used only when a scrap title directly next to a section # title is distracting or repetetive. scrap.attlist &= common.att, attribute lang { xsd:IDREF }?, [ a:defaultValue = "show" ] attribute headstyle { "show" | "suppress" }? # prodgroup: Sub-collection of productions, needed for # formatting reasons. prodgroup = element prodgroup { prodgroup.attlist, prod+ } # pcw attributes: # Presentational attributes to control the width # of the "pseudo-table" columns used to output # groups of productions. prodgroup.attlist &= common.att, attribute pcw1 { text }?, attribute pcw2 { text }?, attribute pcw3 { text }?, attribute pcw4 { text }?, attribute pcw5 { text }? # prod: EBNF language production. prod = element prod { prod.attlist, lhs, (rhs, (com | wfc | vc | constraint)*)+ } # ID attribute: # The production must have an ID so that cross-references # (specref) and mentions of nonterminals (nt) can link to # it. prod.attlist &= common-idreq.att # lhs: Left-hand side of production. lhs = element lhs { lhs.attlist, text } lhs.attlist &= common.att # rhs: Right-hand side of production; may have many # "right-hand sides," one to a line. rhs = element rhs { rhs.attlist, (text | nt | xnt | com)* } rhs.attlist &= common.att # nt and xnt (defined in "Phrase-level elements" below) # #1997-11-28: maler: Added loc and bibref to com content. # com: Production comment. com = element com { com.attlist, (text | loc | bibref)* } com.attlist &= common.att # wfc: Reference to a well-formedness constraint; should # generate the head of the wfcnote pointed to. wfc = element wfc { wfc.attlist, empty } # def attribute: # Each well formedness tagline in a production must link to the # wfcnote that defines it. wfc.attlist &= def-req.att, common.att # vc: Reference to a validity constraint; should generate # the head of the vcnote pointed to. vc = element vc { vc.attlist, empty } # def attribute: # Each validity tagline in a production must link to the vcnote # that defines it. vc.attlist &= def-req.att, common.att # #1998-05-21: maler: Declared generic constraint element. # constraint: Reference to a generic constraint; should # generate the head of the constraintnote pointed to. constraint = element constraint { constraint.attlist, empty } # def attribute: # Each constraint tagline in a production must link to the # constraint note that defines it. constraint.attlist &= def-req.att, common.att # #1998-03-23: maler: Added xml:space attribute. # bnf: Un-marked-up EBNF production, with whitespace # respected. bnf = element bnf { bnf.attlist, eg.pcd.mix* } bnf.attlist &= common.att, xmlspace.att # #1999-07-02: maler: Declared prodrecap. # prodrecap: Reference to production or bnf that appears # in its "normative" form elsewhere in the spec; should # generate a copy of the original production, without # a production number next to it. prodrecap = element prodrecap { prodrecap.attlist, empty } prodrecap.attlist &= common.att, ref-req.att # ............................................................... # Table ......................................................... # ............................................................... # #1997-10-16: maler: Added table mechanism. # #1997-11-28: maler: Added non-null system ID to entity declaration. # # Added HTML table module. # #1997-12-29: maler: IGNOREd SGML Open table model. # #1998-03-10: maler: Removed SGML Open table model. # # Merged html-tbl.mod file into main file. # # Added %common.att; to all HTML table elements. # #1998-05-14: maler: Replaced table model with full HTML 4.0 model. # # Removed htable in favor of table. # # Removed htbody in favor of tbody. cellhalign.att = attribute align { "left" | "center" | "right" | "justify" | "char" }?, attribute char { text }?, attribute charoff { text }? cellvalign.att = attribute valign { "top" | "middle" | "bottom" | "baseline" }? thtd.att = attribute abbr { text }?, attribute axis { text }?, attribute headers { xsd:IDREFS }?, attribute scope { "row" | "col" | "rowgroup" | "colgroup" }?, [ a:defaultValue = "1" ] attribute rowspan { xsd:NMTOKEN }?, [ a:defaultValue = "1" ] attribute colspan { xsd:NMTOKEN }? width.att = attribute width { text }? span.att = [ a:defaultValue = "1" ] attribute span { xsd:NMTOKEN }? # table: HTML-based geometric table model. table = element table { table.attlist, caption?, (col* | colgroup*), thead?, tfoot?, tbody+ } table.attlist &= common.att, width.att, attribute summary { text }?, attribute border { text }?, attribute frame { "void" | "above" | "below" | "hsides" | "lhs" | "rhs" | "vsides" | "box" | "border" }?, attribute rules { "none" | "groups" | "rows" | "cols" | "all" }?, attribute cellspacing { text }?, attribute cellpadding { text }? caption = element caption { caption.attlist, p.pcd.mix* } caption.attlist &= common.att col = element col { col.attlist, empty } col.attlist &= common.att, span.att, width.att, cellhalign.att, cellvalign.att colgroup = element colgroup { colgroup.attlist, col* } colgroup.attlist &= common.att, span.att, width.att, cellhalign.att, cellvalign.att thead = element thead { thead.attlist, tr+ } thead.attlist &= common.att, cellhalign.att, cellvalign.att tfoot = element tfoot { tfoot.attlist, tr+ } tfoot.attlist &= common.att, cellhalign.att, cellvalign.att tbody = element tbody { tbody.attlist, tr+ } tbody.attlist &= common.att, cellhalign.att, cellvalign.att tr = element tr { tr.attlist, (th | td)+ } tr.attlist &= common.att, cellhalign.att, cellvalign.att th = element th { th.attlist, (p.pcd.mix | p.mix)* } th.attlist &= common.att, thtd.att, cellhalign.att, cellvalign.att td = element td { td.attlist, (p.pcd.mix | p.mix)* } td.attlist &= common.att, thtd.att, cellhalign.att, cellvalign.att # ............................................................... # IDL structures for DOM specifications ......................... # ............................................................... # ............................................................... # Specialized entities for classes .............................. idl-desc.class = p | note idl-tdef.class = typedef | constant | exception | reference | group idl-mod.class = module | interface idl-struct.class = struct | enum | sequence | union | typename idl-meth.class = method | \attribute # ............................................................... # Specialized entities for mixtures ............................. # Quick reference to content model mixtures: # # desc tdef mod struct meth # group x x x x x # definitions, module x x x # interface x x x # typedef, case, component x idl-grp.mix = idl-desc.class | idl-tdef.class | idl-mod.class | idl-struct.class | idl-meth.class idl-defn.mix = idl-desc.class | idl-tdef.class | idl-mod.class idl-intfc.mix = idl-desc.class | idl-tdef.class | idl-meth.class idl-type.mix = idl-struct.class # ............................................................... # Specialized entities for common attributes .................... # name attribute: # Provides a name. Required. idl-name.att = attribute name { text } # type attribute: # Provides a type. Required. idl-type.att = attribute type { text } # ............................................................... # Common IDL element ............................................ descr = element descr { descr.attlist, obj.mix* } descr.attlist &= common.att # ............................................................... # IDL definition elements ....................................... # definitions: Top-level element for definitions. definitions = element definitions { definitions.attlist, idl-defn.mix+ } definitions.attlist &= common.att # group: Element used to group a set of definitions. group = element group { group.attlist, descr, idl-grp.mix* } group.attlist &= common.att, idl-name.att # interface: Definition of an interface. interface = element interface { interface.attlist, descr, idl-intfc.mix* } interface.attlist &= common.att, idl-name.att, attribute inherits { text }? # module: Definition of a module. module = element module { module.attlist, descr, idl-defn.mix* } module.attlist &= common.att, idl-name.att # reference: Reference to some other declaration. reference = element reference { reference.attlist, empty } reference.attlist &= common.att, attribute declaration { xsd:IDREF } # typedef: Definition of a named type. typedef = element typedef { typedef.attlist, descr, idl-type.mix } typedef.attlist &= common.att, idl-name.att, attribute array.size { xsd:NMTOKEN }? # struct: Declaration of a struct type. struct = element struct { struct.attlist, descr, component+ } struct.attlist &= common.att, idl-name.att # component: Declaration of a structural member. component = element component { component.attlist, idl-type.mix } component.attlist &= common.att, idl-name.att # union: Declaration of a union type. union = element union { union.attlist, descr, case+ } union.attlist &= common.att, idl-name.att, attribute switch.type { text } case = element case { case.attlist, descr, idl-type.mix } case.attlist &= common.att, attribute labels { text } # enum: Declaration of an enum type. enum = element enum { enum.attlist, descr, enumerator+ } enum.attlist &= common.att, idl-name.att enumerator = element enumerator { enumerator.attlist, descr } enumerator.attlist &= common.att, idl-name.att # sequence: Declaration of a sequence type (not named). sequence = element sequence { sequence.attlist, sequence* } sequence.attlist &= common.att, idl-type.att, attribute size { xsd:NMTOKEN }? # constant: Declaration of a named constant. constant = element constant { constant.attlist, descr } constant.attlist &= common.att, idl-name.att, idl-type.att, attribute value { text } # exception: Declaration of an exception. exception = element exception { exception.attlist, descr, component* } exception.attlist &= common.att, idl-name.att # component (defined under struct, above) # attribute: Declaration of an attribute (data member). \attribute = element attribute { attribute.attlist, descr } attribute.attlist &= common.att, idl-name.att, idl-type.att, [ a:defaultValue = "no" ] attribute readonly { "yes" | "no" }? # method: Declaration of a method. method = element method { method.attlist, descr, parameters, returns, raises } method.attlist &= common.att, idl-name.att parameters = element parameters { parameters.attlist, param* } parameters.attlist &= common.att param = element param { param.attlist, descr } param.attlist &= common.att, idl-name.att, idl-type.att, [ a:defaultValue = "inout" ] attribute attr { "in" | "out" | "inout" }? returns = element returns { returns.attlist, descr } returns.attlist &= common.att, idl-type.att raises = element raises { raises.attlist, exception* } raises.attlist &= empty # exception (defined under constant, above) typename = element typename { typename.attlist, text } typename.attlist &= common.att # ............................................................... # Phrase-level elements ......................................... # ............................................................... # #2000-03-07: maler: Added att and attval elements. # att: Attribute name. att = element att { att.attlist, tech.pcd.mix* } att.attlist &= common.att # attval: Attribute value. attval = element attval { attval.attlist, tech.pcd.mix* } attval.attlist &= common.att # bibref: Reference to a bibliography list entry; should # generate, in square brackets, "key" on bibl. bibref = element bibref { bibref.attlist, empty } # ref attribute: # A bibliography reference must link to the bibl element that # describes the resource. bibref.attlist &= common.att, ref-req.att code = element code { code.attlist, tech.pcd.mix* } code.attlist &= common.att # #1998-03-10: maler: Declared ednote and related elements. # #1999-07-02: maler: Changed edtext content from #PCDATA to %p.pcd.mix;. # ednote: Editorial note for communication among editors. ednote = element ednote { ednote.attlist, name?, date?, edtext } ednote.attlist &= common.att date = element date { date.attlist, text } date.attlist &= common.att edtext = element edtext { edtext.attlist, p.pcd.mix* } edtext.attlist &= common.att # #2000-03-07: maler: Added el element. # el: Element type name (GI). el = element el { el.attlist, tech.pcd.mix* } el.attlist &= common.att # #2000-03-07: maler: Expanded emph to %p.pcd.mix;. emph = element emph { emph.attlist, p.pcd.mix* } emph.attlist &= common.att # footnote: Both footnote content and call to footnote. footnote = element footnote { footnote.attlist, obj.mix+ } footnote.attlist &= common.att # #2000-03-07: maler: Added function and gave it content of # # %tech.pcd.mix; instead of XPath's #PCDATA. function = element function { function.attlist, tech.pcd.mix* } function.attlist &= common.att kw = element kw { kw.attlist, tech.pcd.mix* } kw.attlist &= common.att # #1999-07-02: maler: Added show/actuate attributes and default values. # loc: Generic link to a Web resource, similar to HTML's A. loc = element loc { loc.attlist, text } # href attribute: # The purpose of a loc element is to function as a A-like # hypertext link to a resource. (Ideally, the content of loc # will also mention the URI of the resource, so that readers of # the printed version will be able to locate the resource.) E.g.: # # http://www.my.com/doc.htm loc.attlist &= common.att, simple-xlink.att, href-req.att, user-replace.att # nt: Mention of a nonterminal in text, along with a link to # the production in the current document that defines it. nt = element nt { nt.attlist, text } # def attribute: # The nonterminal must link to the production that defines # it. nt.attlist &= common.att, def-req.att # #2000-03-07: maler: Declared phrase. # phrase: "Attribute hanger" for small bits of (e.g.) differenced # text in a paragraph or similar, when another element isn't handy. # Beware that its content model may allow more nested elements than # would normally be allowed in some contexts. phrase = element phrase { phrase.attlist, p.pcd.mix* } phrase.attlist &= common.att # #1998-03-10: maler: Declared quote. # quote: Scare quotes and other purely presentational quotes. quote = element quote { quote.attlist, p.pcd.mix* } quote.attlist &= common.att # specref: Reference to a div, olist item, prod, or issue # in the current document; should generate italic "[n.n], # Section Title" for div, "n" for numbered item, "[n]" for # production, or "Issue id" for issue. specref = element specref { specref.attlist, empty } # ref attribute: # The purpose of a specref element is to link to a div, item # in an olist, or production in the current spec. specref.attlist &= common.att, ref-req.att # #2000-03-07: maler: Added sub and sup. # sub: Subscript. sub = element sub { sub.attlist, text } sub.attlist &= common.att # sup: Superscript. sup = element sup { sup.attlist, text } sup.attlist &= common.att # term: The term in text that is being defined in text. term = element term { term.attlist, text } term.attlist &= common.att # termdef: Definition of a term in text. termdef = element termdef { termdef.attlist, (termdef.pcd.mix | termdef.mix)* } # ID attribute: # A term definition must have an ID so that it can be linked # to from termref elements. # term attribute: # The canonical form of the term or phrase being defined must # appear in this attribute, even if the term or phrase also # appears in the element content in identical form (e.g., in # the term element). termdef.attlist &= common-idreq.att, attribute term { text } # termref: Mention of a term, along with a link to the # definition in the current document. termref = element termref { termref.attlist, text } # ref attribute: # A term reference must link to the termdef element that # defines the term. termref.attlist &= common.att, def-req.att # #1999-07-02: maler: Added show/actuate attributes and default values. # titleref: Citation of another document, which can also # link to that document if it is a Web resource. titleref = element titleref { titleref.attlist, text } # href attribute: # A title reference can optionally function as a hypertext # link to the resource with this title. E.g.: # # http://www.my.com/doc.htm titleref.attlist &= common.att, simple-xlink.att, href.att, user-new.att # #2000-03-07: maler: Added var. # var: String standing for a variable value that the user # or system will supply. For example: "For each node # x in this node-set..." var = element var { var.attlist, tech.pcd.mix* } var.attlist &= common.att # #1999-07-02: maler: Added show/actuate attributes and default values. # xnt: Mention of a nonterminal in text, along with a link to # the production in another document that defines it. xnt = element xnt { xnt.attlist, text } # href attribute: # The nonterminal must hyperlink to a resource that serves # to define it (e.g., a production in a related XML # specification). E.g.: # # Name xnt.attlist &= common.att, simple-xlink.att, href-req.att, user-new.att # #1997-12-29: maler: Declared xspecref. # #1999-07-02: maler: Added show/actuate attributes and default values. # xspecref: Reference to a div, olist item, prod, or issue # in a related specification document; should generate # no special text. xspecref = element xspecref { xspecref.attlist, text } # href attribute: # The spec reference must hyperlink to the resource to # cross-refer to (e.g., a section in a related XML # specification). E.g.: # # # the section on constraints xspecref.attlist &= common.att, simple-xlink.att, href-req.att, user-new.att # #1999-07-02: maler: Added show/actuate attributes and default values. # termref: Mention of a term, along with a link to the # definition in a related document. xtermref = element xtermref { xtermref.attlist, text } # href attribute: # The term reference must hyperlink to the resource that # serves to define the term (e.g., a term definition in # a related XML specification). E.g.: # # # entity # xtermref.attlist &= common.att, simple-xlink.att, href-req.att, user-new.att # ............................................................... # Unused elements for ADEPT ..................................... # ............................................................... # #1997-09-30: maler: Added unusued elements. # #1997-10-14: maler: Fixed div to move nested div to the mixture. # #1998-05-14: maler: Added key-term, htable, and htbody. # #1998-11-30: maler: Added para, listitem, itemizedlist, and orderedlist. # The following elements are purposely declared but never # referenced. Declaring them allows them to be pasted from # an HTML document, an earlier version of an XMLspec document, # or a DocBook document into a document using this DTD in ADEPT. # The ATD Context Transformation mechanism will try to convert # them to the appropriate element for this DTD. While this # conversion will not work for all fragments, it does allow many # cases to work reasonably well. \div = element div { div.attlist, head?, (div.mix | ul | ol | h1 | h2 | h3 | h4 | h5 | h6 | \div)* } div.attlist &= empty h1 = element h1 { h1.attlist, (head.pcd.mix | em | a)* } h1.attlist &= empty h2 = element h2 { h2.attlist, (head.pcd.mix | em | a)* } h2.attlist &= empty h3 = element h3 { h3.attlist, (head.pcd.mix | em | a)* } h3.attlist &= empty h4 = element h4 { h4.attlist, (head.pcd.mix | em | a)* } h4.attlist &= empty h5 = element h5 { h5.attlist, (head.pcd.mix | em | a)* } h5.attlist &= empty h6 = element h6 { h6.attlist, (head.pcd.mix | em | a)* } h6.attlist &= empty pre = element pre { pre.attlist, (eg.pcd.mix | em)* } pre.attlist &= empty ul = element ul { ul.attlist, (item | li)* } ul.attlist &= empty ol = element ol { ol.attlist, (item | li)* } ol.attlist &= empty li = element li { li.attlist, (text | obj.mix)* } li.attlist &= empty em = element em { em.attlist, text } em.attlist &= empty a = element a { a.attlist, text } a.attlist &= empty key-term = element key-term { key-term.attlist, text } key-term.attlist &= empty htable = element htable { htable.attlist, caption?, (col* | colgroup*), thead?, tfoot?, tbody+ } htable.attlist &= empty htbody = element htbody { htbody.attlist, tr+ } htbody.attlist &= empty statusp = element statusp { statusp.attlist, (p.pcd.mix | p.mix)* } statusp.attlist &= empty itemizedlist = element itemizedlist { itemizedlist.attlist, listitem* } itemizedlist.attlist &= empty orderedlist = element orderedlist { orderedlist.attlist, listitem* } orderedlist.attlist &= empty listitem = element listitem { listitem.attlist, para* } listitem.attlist &= empty para = element para { para.attlist, text } para.attlist &= empty start = statusp | spec | pre | orderedlist | key-term | htbody | htable | itemizedlist # ............................................................... # Change history ................................................ # ............................................................... # #1997-08-18: maler # #- Did a major revision. # #1997-09-10: maler # #- Updated FPI. # #- Removed namekey element and put key attribute on name element. # #- Made statusp element and supporting entities. # #- Added slist element with sitem+ content. # #- Required head on scrap and added new bnf subelement. # #- Added an xnt element and allowed it and nt in regular text and rhs. # #- Removed the ntref element. # #- Added back the com element to the content of rhs. # #- Added a key attribute to bibl. # #- Removed the ident element. # #- Added a term element to be used inside termdef. # #- Added an xtermref element parallel to termref. # #- Beefed up DTD comments. # #1997-09-12: maler # #- Allowed term element in general text. # #- Changed bibref to EMPTY. # #- Added ref.class to termdef.pcd.mix. # #1997-09-14: maler # #- Changed main attribute of xtermref from def to href. # #- Added termdef.class to label contents. # #1997-09-30: maler # #- Added character entity module and added new entities. # #- Removed p from appearing directly in self; created %p.mix;. # #- Added inform-div (non-normative division) element. # #- Fixed xtermref comment to mention href, not ref. # #- Extended orglist model to allow optional affiliation. # #- Modified author to make affiliation optional. # #- Added %speclist.class; and %note.class; to %obj.mix; and %p.mix;. # #- Added %note.class; and %illus.class; to %termdef.pcd.mix;. # #- Added unused HTML elements. # #- Put empty system ID next to public ID in entity declarations. # #1997-10-14: maler # #- Fixed "unused" div content model to move nested div to mixture. # #1997-10-16: maler # #- Added SGML Open Exchange tables. # #1997-11-28: maler # #- Added support for prodgroup and its attributes. # #- Added support for HTML tables. # #- Added loc and bibref to content of com. # #- Added loc to general p content models. # #- Allowed p as alternative to statusp in status. # #- Added non-null system IDs to external parameter entity declarations. # #- (Modified the SGML Open table module to make it XML-compliant.) # #- (Modified the character entity module.) # #1997-12-29: maler # #- Moved #PCDATA occurrences to come before GIs in content models. # #- Removed use of the SGML Open table module. # #- Added xspecref element. # #- Ensured that all FPIs contain 4-digit year. # #- (Modified the character entity module.) # #1998-03-10: maler # #- Merged the character entity and table modules into the main file. # #- Added ldquo and rdquo entities. # #- Added common attributes to prodgroup. # #- Made the email element in header optional. # #- Removed reference to the SGML Open table model. # #- Added ednote element. # #- Added quote element. # #- Updated XLink usage to reflect 3 March 1998 WD. # #- Added "local" entities to the class entities for customization. # #- Parameterized several content models to allow for customization. # #1998-03-23: maler # #- Cleaned up some comments and removed some others. # #- Added xml:space semi-common attribute to eg and bnf elements. # #- Added show and embed attributes on all the uses of href. # #- Added %common.att; to all HTML table elements. # #- Added a real URI to the "typical invocation" comment. # #1998-05-14: maler # #- Fixed mdash, ldquo, and rdquo character entities. # #- Switched to the full HTML 4.0 table model. # #- Removed htable/htbody elements and replaced them with table/tbody. # #- Added issue element to %note.class; and declared it. # #- Allowed prevlocs and latestloc in either order. # #- Added key-term, htable, htbody, and statusp as unused elements. # #- Removed real statusp element in favor of plain p. # #1998-05-21: maler # #- Declared generic constraint and constraintnote elements. # #- Added constraintnote to %note.class;. # #- Added constraint to %eg.pcd.mix; and prod content model. # #1998-08-22: maler # #- Fixed %illus.class; to mention table instead of htable. # #- Added definitions to %illus.class; for DOM model. # #- Added DOM definitions element and its substructure. # #- Updated XLink usage in %href.att; to use xlink:form and #IMPLIED. # #- Added clarifying comments to href-using elements. # #1998-11-30: maler # #- Added new unused elements to support DocBook translation. # #- Updated maler phone numbers. # #1998-12-3: maler # #- Fixed character entities with respect to escaping of ampersands. # #- Added many more explanatory comments. # #1999-07-02: maler # #- Added %loc.class; to all PCD mixes that didn't already have it. # #- Removed unused %loc.pcd.mix;. # #- Made version in spec header optional. # #- Added three new attributes to spec. # #- Broadened content of edtext. # #- Added optional copyright element to header. # #- Reorganized XLink-related parameter entities; added xmlns:xlink. # #- Changed edtext content from #PCDATA to %p.pcd.mix;. # #- Added show/actuate atts and default values to all href elements. # #- Changed versioning scheme from 8-digit dates to version numbers. # #- Added w3c-doctype, other-doctype, status atts to spec element. # #- Added prodrecap element inside scrap. # #- Added headstyle attribute to scrap. # #2000-03-07: maler # #- Added proto element, its arg subelement, and the %argtypes; entity. # #- Added function, var, sub, sup, phrase, el, att, attval elements. # #- Expanded emph to %p.pcd.mix;. # #- Allowed status and abstract to appear in the opposite order. # #- Updated XLink usage to the latest WD, except for href and source. # #- Removed the xml:attributes attribute from graphic. # #- Added %local.graphic.att; to graphic. # #- Added common diff attribute. # #- Added div5 element. # #- Broadened content models of publoc, prevlocs, and latestloc. # #- Added head, source, resolution, and status attribute to issue. # #- Added cr, issues, and dispcmts to w3c-doctype attribute on spec. # #- Added example element. # ............................................................... # End of XML specification DTD .................................. # ...............................................................