]> granicus.if.org Git - docbook-dsssl/commitdiff
Remove stupid choice-list cruft; make ctrl:other-attribute just an annotation
authorNorman Walsh <ndw@nwalsh.com>
Wed, 17 Sep 2003 14:41:14 +0000 (14:41 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Wed, 17 Sep 2003 14:41:14 +0000 (14:41 +0000)
docbook/relaxng/src/callouts.rnc
docbook/relaxng/src/calstbl.rnc
docbook/relaxng/src/docbook.rnc
docbook/relaxng/src/htmltbl.rnc
docbook/relaxng/src/mathml.rnc
docbook/relaxng/src/msgset.rnc
docbook/relaxng/src/pool.rnc

index a548ad3e915eac0717c9932fab4157cb79a4a4f3..9b833fafc49bc0318c693b5d9709ce0f5b320910 100644 (file)
 
 namespace ctrl = "http://nwalsh.com/xmlns/schema-control/"
 
-ctrl:choice-list [ name="publishing.inlines" choose="db.coref" ]
-ctrl:choice-list [ name="list.blocks" choose="db.calloutlist" ]
-ctrl:choice-list [ name="verbatim.blocks" choose="db.programlistingco" ]
-ctrl:choice-list [ name="verbatim.blocks" choose="db.screenco" ]
-ctrl:choice-list [ name="graphic.blocks" choose="db.mediaobjectco" ]
-ctrl:choice-list [ name="screenshot.block" choose="db.mediaobjectco" ]
-ctrl:choice-list [ name="computeroutput.inlines" choose="db.co" ]
-ctrl:choice-list [ name="verbatim.inlines" choose="db.co" ]
-ctrl:choice-list [ name="prompt.inlines" choose="db.co" ]
-ctrl:choice-list [ name="systemitem.inlines" choose="db.co" ]
+publishing.inlines |= db.coref
+list.blocks |= db.calloutlist
+verbatim.blocks |= db.programlistingco
+verbatim.blocks |= db.screenco
+graphic.blocks |= db.mediaobjectco
+screenshot.block |= db.mediaobjectco
+computeroutput.inlines |= db.co
+verbatim.inlines |= db.co
+prompt.inlines |= db.co
+systemitem.inlines |= db.co
 
 area.units.enumtype.attribute =
    attribute units {
index c7166eb53a88d8f8c85f02b68c01325495aedb33..d16d64a4ae30cd5a79b73b0f4644953a6d4135d4 100644 (file)
@@ -114,8 +114,8 @@ cals.table.pgwide.attrib = attribute pgwide { "0" | "1" }
 cals.table.info = docbook.info.titlereq
 cals.table = element table { cals.table.info, cals.table.model }
 
-ctrl:choice-list [ name="table.choice" choose="cals.table" ]
-ctrl:choice-list [ name="table.contentmodel" choose="cals.table.model" ]
+table.choice |= cals.table
+table.contentmodel |= cals.table.model
 
 informaltable.tabstyle.attrib |= cals.table.tabstyle.attrib
 informaltable.orient.attrib |= cals.table.orient.attrib
index b3ebf1913ee90d535a95478d015a42e448d68aaf..5d525070c6db2eefd12596912aa1ba2b20b278a3 100644 (file)
@@ -23,3 +23,5 @@ start = db.set
        | db.section
        | db.para
 
+include "hier.rnc"
+include "pool.rnc"
index f31cc3a4e5c1640478f523aa38865bb0d2e977d0..684ce4af5ffd3b6533101449704458b13f055533 100644 (file)
@@ -127,7 +127,7 @@ html.td.cellhalign.attrib = html.cellhalign
 html.td.cellvalign.attrib = html.cellvalign
 html.td = element td { (inlines* | blocks*) }
 
-ctrl:choice-list [ name="table.choice" choose="html.table" ]
-ctrl:choice-list [ name="table.contentmodel" choose="html.table.model" ]
+table.choice |= html.table
+table.contentmodel |= html.table.model
 
 informaltable.frame.attrib |= html.table.frame.attrib
index f242f20f21f4e135985daf07e81b028296ff416b..6ca8fc0970c12871db3e99b1a0e6214d8621278c 100644 (file)
@@ -22,5 +22,5 @@ any.mml =
    }
 
 
-ctrl:choice-list [ name="equation.content" choose="any.mml" ]
-ctrl:choice-list [ name="inlineequation.content" choose="any.mml" ]
+equation.content |= any.mml
+inlineequation.content |= any.mml
index 47a406ac0e71dca30897270a23fb889c44a86f9d..919b8dfc0f6f45874b6c535046cb5fe00a403196 100644 (file)
@@ -40,4 +40,5 @@ db.msgaud = element msgaud { ubiq.inlines* }
 
 db.msgexplan = element msgexplan { db.title?, blocks+ }
 
-ctrl:choice-list [ name="technical.blocks" choose="db.msgset" ]
+technical.blocks |= db.msgset
+
index bc6cd8740376425cc8243163a770c5bde9e5ffc3..8945b97e592738cecc64b4ebd11ace841cf9e524 100644 (file)
@@ -101,9 +101,21 @@ oo-language.attribute = attribute language { text }?
 
 ctrl:other-attribute [ name="biblio"
                        attribute-name="class"
-                       attribute-values="doi isbn issn libraryofcongress pubnumber uri"
-                       other-attribute-name="otherclass"
-                       other-attribute-value="other" ]
+                       other-attribute-name="otherclass" ]
+
+biblio.class-enum.attribute =
+   attribute class { "doi"
+    | "isbn"
+    | "issn"
+    | "libraryofcongress"
+    | "pubnumber"
+    | "uri" }?
+
+biblio.class-other.attributes =
+   attribute class { "other" },
+   attribute otherclass { xsd:NMTOKEN }
+
+biblio.class.attrib = (biblio.class-enum.attribute | biblio.class-other.attributes)
 
 significance.attribute = attribute significance { "normal" | "preferred" }
 zone.attribute = attribute zone { xsd:IDREFS }
@@ -201,17 +213,18 @@ glossary.inlines =
    db.firstterm
  | db.glossterm
 
-ctrl:choice-list [ name="publishing.inlines" choose="db.abbrev" ]
-ctrl:choice-list [ name="publishing.inlines" choose="db.acronym" ]
-ctrl:choice-list [ name="publishing.inlines" choose="db.emphasis" ]
-ctrl:choice-list [ name="publishing.inlines" choose="db.footnote" ]
-ctrl:choice-list [ name="publishing.inlines" choose="db.footnoteref" ]
-ctrl:choice-list [ name="publishing.inlines" choose="db.foreignphrase" ]
-ctrl:choice-list [ name="publishing.inlines" choose="db.phrase" ]
-ctrl:choice-list [ name="publishing.inlines" choose="db.quote" ]
-ctrl:choice-list [ name="publishing.inlines" choose="db.subscript" ]
-ctrl:choice-list [ name="publishing.inlines" choose="db.superscript" ]
-ctrl:choice-list [ name="publishing.inlines" choose="db.wordasword" ]
+publishing.inlines =
+   db.abbrev
+ | db.acronym
+ | db.emphasis
+ | db.footnote
+ | db.footnoteref
+ | db.foreignphrase
+ | db.phrase
+ | db.quote
+ | db.subscript
+ | db.superscript
+ | db.wordasword
 
 math.inlines = db.inlineequation
 
@@ -276,10 +289,9 @@ publishing.blocks =
  | db.address
  | db.epigraph
 
-ctrl:choice-list [ name="graphic.blocks" choose="db.mediaobject" ]
-ctrl:choice-list [ name="graphic.blocks" choose="db.screenshot" ]
+graphic.blocks = db.mediaobject | db.screenshot
 
-ctrl:choice-list [ name="technical.blocks" choose="db.procedure" ]
+technical.blocks = db.procedure
 
 admonition.blocks =
    db.caution
@@ -288,16 +300,18 @@ admonition.blocks =
  | db.tip
  | db.warning
 
-ctrl:choice-list [ name="list.blocks" choose="db.itemizedlist" ]
-ctrl:choice-list [ name="list.blocks" choose="db.orderedlist" ]
-ctrl:choice-list [ name="list.blocks" choose="db.procedure" ]
-ctrl:choice-list [ name="list.blocks" choose="db.simplelist" ]
-ctrl:choice-list [ name="list.blocks" choose="db.variablelist" ]
+list.blocks =
+   db.itemizedlist
+ | db.orderedlist
+ | db.procedure
+ | db.simplelist
+ | db.variablelist
 
-ctrl:choice-list [ name="verbatim.blocks" choose="db.programlisting" ]
-ctrl:choice-list [ name="verbatim.blocks" choose="db.screen" ]
-ctrl:choice-list [ name="verbatim.blocks" choose="db.literallayout" ]
-ctrl:choice-list [ name="verbatim.blocks" choose="db.synopsis" ]
+verbatim.blocks =
+   db.programlisting
+ | db.screen
+ | db.literallayout
+ | db.synopsis
 
 synopsis.blocks =
    db.cmdsynopsis
@@ -443,8 +457,8 @@ db.answer = element answer { db.label?, blocks+ }
 
 db.label = element label { docbook.text }
 
-ctrl:choice-list [ name="table.choice" choose="#notAllowed" ]
-ctrl:choice-list [ name="table.contentmodel" choose="#notAllowed" ]
+table.choice = notAllowed
+table.contentmodel = notAllowed
 
 db.table = table.choice
 
@@ -598,8 +612,7 @@ db.example = element example { example.info, blocks+ }
 informalexample.info = db.info.titleforbidden
 db.informalexample = element informalexample { informalexample.info, blocks+ }
 
-ctrl:choice-list [ name="verbatim.inlines" choose="inlines" ]
-ctrl:choice-list [ name="verbatim.inlines" choose="db.lineannotation" ]
+verbatim.inlines = inlines | db.lineannotation
 
 verbatim.contentmodel = docbook.info.titleforbidden, verbatim.inlines*
 
@@ -613,8 +626,7 @@ db.literallayout = element literallayout { verbatim.contentmodel }
 screen.linenumbering.attrib = linenumbering.attribute
 db.screen = element screen { verbatim.contentmodel }
 
-
-ctrl:choice-list [ name="screenshot.block" choose="db.mediaobject" ]
+screenshot.block = db.mediaobject
 
 screenshot.info = docbook.info
 db.screenshot =
@@ -682,7 +694,7 @@ db.textdata = element textdata { db.info.titleforbidden? }
 
 db.caption = element caption { inlines* | blocks+ }
 
-ctrl:choice-list [ name="equation.content" choose="db.mediaobject" ]
+equation.content = db.mediaobject
 
 equation.info = docbook.info.titlereq
 db.equation = element equation { equation.info, equation.content+ }
@@ -695,7 +707,7 @@ db.informalequation =
       equation.content+
    }
 
-ctrl:choice-list [ name="inlineequation.content" choose="db.inlinemediaobject" ]
+inlineequation.content = db.inlinemediaobject
 
 db.inlineequation = element inlineequation { inlineequation.content+ }
 
@@ -999,23 +1011,63 @@ bibliorelation.class.attrib = biblio.class.attrib
 
 ctrl:other-attribute [ name="bibliorelation"
                        attribute-name="type"
-                       attribute-values="hasformat haspart hasversion isformatof ispartof isreferencedby isreplacedby isrequiredby isversionof references replaces requires"
-                       other-attribute-name="othertype"
-                       other-attribute-value="othertype" ]
+                       other-attribute-name="othertype" ]
+
+bibliorelation.type-enum.attribute =
+   attribute type { "hasformat"
+    | "haspart"
+    | "hasversion"
+    | "isformatof"
+    | "ispartof"
+    | "isreferencedby"
+    | "isreplacedby"
+    | "isrequiredby"
+    | "isversionof"
+    | "othertype"
+    | "references"
+    | "replaces"
+    | "requires" }?
+
+bibliorelation.type-other.attributes =
+   attribute type { "othertype" },
+   attribute othertype { xsd:NMTOKEN }
+
+bibliorelation.type.attrib =
+   (bibliorelation.type-enum.attribute | bibliorelation.type-other.attributes)
 
 db.bibliorelation = element bibliorelation { docbook.text }
 
 ctrl:other-attribute [ name="bibliocoverage"
                        attribute-name="spatial"
-                       attribute-values="dcmibox dcmipoint iso3166 tgn"
-                       other-attribute-name="otherspacial"
-                       other-attribute-value="otherspacial" ]
+                       other-attribute-name="otherspacial" ]
+
+bibliocoverage.spatial-enum.attribute =
+   attribute spatial {
+      "dcmipoint" | "iso3166" | "dcmibox" | "tgn"
+   }?
+
+bibliocoverage.spatial-other.attributes =
+   attribute spatial { "otherspatial" },
+   attribute otherspacial { xsd:NMTOKEN }
+
+bibliocoverage.spatial.attrib =
+   (bibliocoverage.spatial-enum.attribute | bibliocoverage.spatial-other.attributes)
 
 ctrl:other-attribute [ name="bibliocoverage"
                        attribute-name="temporal"
-                       attribute-values="dcmiperiod othertemporal w3c-dtf"
-                       other-attribute-name="othertemporal"
-                       other-attribute-value="othertemporal" ]
+                       other-attribute-name="othertemporal" ]
+
+bibliocoverage.temporal-enum.attribute =
+   attribute temporal {
+      "dcmiperiod" | "w3c-dtf"
+   }?
+
+bibliocoverage.temporal-other.attributes =
+   attribute temporal { "othertemporal" },
+   attribute othertemporal { xsd:NMTOKEN }
+
+bibliocoverage.temporal.attrib =
+   (bibliocoverage.temporal-enum.attribute | bibliocoverage.temporal-other.attributes)
 
 db.bibliocoverage = element bibliocoverage { docbook.text }
 
@@ -1082,7 +1134,7 @@ db.classname = element classname { docbook.text }
 
 db.command = element command { inlines* }
 
-ctrl:choice-list [ name="computeroutput.inlines" choose="inlines" ]
+computeroutput.inlines = inlines
 
 db.computeroutput = element computeroutput { computeroutput.inlines* }
 
@@ -1139,9 +1191,19 @@ db.keycode = element keycode { docbook.text }
 
 ctrl:other-attribute [ name="keycombo"
                        attribute-name="action"
-                       attribute-values="click double-click press seq simul"
-                       other-attribute-name="otheraction"
-                       other-attribute-value="other" ]
+                       other-attribute-name="otheraction" ]
+
+keycombo.action-enum.attribute =
+  attribute action {
+    "click" | "double-click" | "press" | "seq" | "simul"
+  }?
+
+keycombo.action-other.attributes =
+   attribute action { "other" },
+   attribute otheraction { xsd:NMTOKEN }
+
+keycombo.action.attrib =
+   (keycombo.action-enum.attribute | keycombo.action-other.attributes)
 
 db.keycombo = element keycombo { docbook.text }
 
@@ -1172,7 +1234,7 @@ db.optional = element optional { inlines* }
 parameter.class.attrib = attribute class { "command" | "function" | "option" }?
 db.parameter = element parameter { docbook.text }
 
-ctrl:choice-list [ name="prompt.inlines" choose="docbook.text" ]
+prompt.inlines = docbook.text
 
 db.prompt = element prompt { prompt.inlines* }
 
@@ -1219,7 +1281,7 @@ systemitem.class.attrib =
     | "username"
   }?
 
-ctrl:choice-list [ name="systemitem.inlines" choose="docbook.text" ]
+systemitem.inlines = docbook.text
 
 db.systemitem = element systemitem { systemitem.inlines* }