]> granicus.if.org Git - docbook-dsssl/commitdiff
DocBook RNG V5.0 alpha1 snapshot
authorNorman Walsh <ndw@nwalsh.com>
Wed, 31 Dec 2003 14:39:54 +0000 (14:39 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Wed, 31 Dec 2003 14:39:54 +0000 (14:39 +0000)
12 files changed:
docbook/relaxng/src/callouts.rnc
docbook/relaxng/src/calstbl.rnc
docbook/relaxng/src/docbook.rnc
docbook/relaxng/src/ebnf.rnc [new file with mode: 0644]
docbook/relaxng/src/hier.rnc
docbook/relaxng/src/htmlform.rnc [new file with mode: 0644]
docbook/relaxng/src/htmltbl.rnc
docbook/relaxng/src/msgset.rnc
docbook/relaxng/src/pool.rnc
docbook/relaxng/src/refentry.rnc [new file with mode: 0644]
docbook/relaxng/src/svg.rnc [new file with mode: 0644]
docbook/relaxng/src/tasks.rnc [new file with mode: 0644]

index 9b833fafc49bc0318c693b5d9709ce0f5b320910..ac4d2f611e4943d57ad4d450968269ae982a2945 100644 (file)
@@ -40,13 +40,13 @@ area.units.attribute =
    (area.units.enumtype.attribute | area.units.othertype.attributes)
 
 
-calloutlist.info = db.info
+calloutlist.info = docbook.info.titleonly
 db.calloutlist = element calloutlist { calloutlist.info, blocks*, db.callout+ }
 
 callout.arearefs.attrib = attribute arearefs { xsd:IDREFS }
 db.callout = element callout { blocks+ }
 
-programlistingco.info = db.info
+programlistingco.info = docbook.info.titleforbidden
 db.programlistingco =
    element programlistingco {
       programlistingco.info,
@@ -74,7 +74,7 @@ areaset.units.attrib = area.units.attribute
 areaset.label.attrib = attribute label { text }?
 db.areaset = element areaset { db.area+ }
 
-screenco.info = db.info
+screenco.info = docbook.info.titleforbidden
 db.screenco =
    element screenco {
       screenco.info,
@@ -83,7 +83,7 @@ db.screenco =
       db.calloutlist*
    }
 
-mediaobjectco.info = db.info
+mediaobjectco.info = docbook.info.titleforbidden
 db.mediaobjectco =
    element mediaobjectco {
       mediaobjectco.info,
@@ -91,10 +91,10 @@ db.mediaobjectco =
       (db.imageobjectco | db.textobject)*
    }
 
-imageobjectco.info = db.info
+imageobjectco.info = docbook.info.titleforbidden
 db.imageobjectco =
    element imageobjectco {
-      imageobjectco.info,
+      imageobjectco.info?,
       db.areaspec,
       db.imageobject,
       db.calloutlist*
index d16d64a4ae30cd5a79b73b0f4644953a6d4135d4..c0ce66ea4ed5c6fbfa4dfff24b40d52366b33903 100644 (file)
 
 namespace ctrl = "http://nwalsh.com/xmlns/schema-control/"
 
-char.attribute = attribute char { text }?
-charoff.attribute = attribute charoff { text }?
-colsep.attribute = attribute colsep { text }?
-rowsep.attribute = attribute rowsep { text }?
+char.attribute = attribute char { text }
+charoff.attribute = attribute charoff { text }
+colsep.attribute = attribute colsep { text }
+rowsep.attribute = attribute rowsep { text }
 align.attribute =
-  attribute align { "center" | "char" | "justify" | "left" | "right" }?
-valign.attribute = attribute valign { "bottom" | "middle" | "top" }?
-spanname.attribute = attribute spanname { text }?
-colname.attribute = attribute colname { text }?
+  attribute align { "center" | "char" | "justify" | "left" | "right" }
+valign.attribute = attribute valign { "bottom" | "middle" | "top" }
+spanname.attribute = attribute spanname { text }
+colname.attribute = attribute colname { text }
 
 tgroup.char.attrib = char.attribute?
 tgroup.charoff.attrib = charoff.attribute?
@@ -49,8 +49,8 @@ colspec.rowsep.attrib = rowsep.attribute?
 colspec.align.attrib = align.attribute?
 db.colspec = element colspec { empty }
 
-spanspec.namest.attrib = attribute namest { text }?
-spanspec.nameend.attrib = attribute nameend { text }?
+spanspec.namest.attrib = attribute namest { text }
+spanspec.nameend.attrib = attribute nameend { text }
 spanspec.spanname.attrib = spanname.attribute
 spanspec.char.attrib = char.attribute?
 spanspec.colsep.attrib = colsep.attribute?
@@ -99,7 +99,6 @@ entrytbl.colname.attrib = colname.attribute?
 entrytbl.align.attrib = align.attribute?
 db.entrytbl = element entrytbl { (db.colspec*, db.spanspec*, cals.thead?, cals.tbody) }
 
-cals.table.model = db.tgroup
 cals.table.tabstyle.attrib = attribute tabstyle { text }?
 cals.table.orient.attrib = attribute orient { "land" | "port" }?
 cals.table.colsep.attrib = colsep.attribute?
@@ -109,17 +108,28 @@ cals.table.frame.attrib =
       "all" | "bottom" | "none" | "sides" | "top" | "topbot"
    }?
 
-cals.table.pgwide.attrib = attribute pgwide { "0" | "1" }
-
-cals.table.info = docbook.info.titlereq
-cals.table = element table { cals.table.info, cals.table.model }
+cals.table.pgwide.attrib = attribute pgwide { "0" | "1" }?
+
+cals.table.info = docbook.info.titleonlyreq
+cals.table = element table {
+   cals.table.info,
+   db.indexterm*,
+   db.textobject*,
+   (db.mediaobject+|db.tgroup+) }
+
+cals.informaltable.info = docbook.info.titleforbidden
+cals.informaltable = element informaltable {
+   cals.informaltable.info,
+   db.indexterm*,
+   db.textobject*,
+   (db.mediaobject+|db.tgroup+) }
+
+cals.informaltable.tabstyle.attrib = cals.table.tabstyle.attrib
+cals.informaltable.orient.attrib = cals.table.orient.attrib
+cals.informaltable.colsep.attrib = cals.table.colsep.attrib
+cals.informaltable.rowsep.attrib = cals.table.rowsep.attrib
+cals.informaltable.frame.attrib = cals.table.frame.attrib
+cals.informaltable.pgwide.attrib = cals.table.pgwide.attrib
 
 table.choice |= cals.table
-table.contentmodel |= cals.table.model
-
-informaltable.tabstyle.attrib |= cals.table.tabstyle.attrib
-informaltable.orient.attrib |= cals.table.orient.attrib
-informaltable.colsep.attrib |= cals.table.colsep.attrib
-informaltable.rowsep.attrib |= cals.table.rowsep.attrib
-informaltable.frame.attrib |= cals.table.frame.attrib
-informaltable.pgwide.attrib |= cals.table.pgwide.attrib
+informaltable.choice |= cals.informaltable
index 5d525070c6db2eefd12596912aa1ba2b20b278a3..f9ce8e1ab42d708c5fd5fc7d5f4af47f2ddb316a 100644 (file)
@@ -24,4 +24,14 @@ start = db.set
        | db.para
 
 include "hier.rnc"
+include "refentry.rnc"
 include "pool.rnc"
+include "tasks.rnc"
+include "callouts.rnc"
+include "ebnf.rnc"
+include "calstbl.rnc"
+include "htmltbl.rnc"
+include "msgset.rnc"
+include "mathml.rnc"
+include "svg.rnc"
+#include "htmlform.rnc"
diff --git a/docbook/relaxng/src/ebnf.rnc b/docbook/relaxng/src/ebnf.rnc
new file mode 100644 (file)
index 0000000..820c6bc
--- /dev/null
@@ -0,0 +1,40 @@
+# (Part of) A prototype DocBook V.next RELAX NG grammar.
+
+# This schema is a "work-in-progress". It validates a DocBook-like grammar that
+# may, in some incarnation, form the basis for DocBook V.next. Or it may not.
+# At the moment, it's just an exploration by Norm. It has utterly no normative
+# value at all.
+#
+# Author: Norman Walsh, <ndw@nwalsh.com>
+# Source: Derived from DocBook XML V4.1 and V4.2
+# Release: $Id$
+#
+
+namespace ctrl = "http://nwalsh.com/xmlns/schema-control/"
+
+productionset.info = docbook.info.titleonly
+
+db.productionset =
+   element productionset { productionset.info, (db.production|db.productionrecap)+ }
+
+ctrl:common-attributes [ element="production" attributes="common.attrib.idreq" ]
+
+db.production = element production { db.lhs, db.rhs, db.constraint* }
+
+db.lhs = element lhs { text }
+
+db.rhs = element rhs { (text|db.nonterminal|db.lineannotation|db.sbr)* }
+
+nonterminal.def.attrib = attribute def { text }
+db.nonterminal = element nonterminal { text }
+
+db.constraint = element constraint { empty }
+
+productionrecap.linkend.attrib = attribute linkend { xsd:IDREF }
+db.productionrecap = element productionrecap { empty }
+
+constraintdef.info = docbook.info.titleonly
+db.constraintdef = element constraintdef { constraintdef.info, blocks+ }
+
+technical.inlines |= db.nonterminal
+technical.blocks |= db.productionset | db.constraintdef
index 417a246a34d09255e46b92da74343f0b2e9612fd..bcdf020bfc29ed9489bf5ca544399b5d81e93b71 100644 (file)
 # ======================================================================
 
 status.attribute = attribute status { text }
+label.attribute = attribute label { text }
 
 # ======================================================================
 
-divisions = db.part | db.reference
+divisions = db.part
 
 components =
    db.dedication
@@ -34,28 +35,29 @@ component.contentmodel =
 # ======================================================================
 
 set.status.attrib = status.attribute?
+set.label.attrib = label.attribute?
 set.info = docbook.info.titlereq
-db.set = element set { set.info, db.toc*, db.book+, db.setindex }
+db.set = element set { set.info, db.toc?, (db.set|db.book)+, db.setindex? }
 
 book.status.attrib = status.attribute?
+book.label.attrib = label.attribute?
 book.info = docbook.info.titlereq
 db.book =
    element book { book.info, (navigation.components | components | divisions)+ }
 
 dedication.status.attrib = status.attribute?
+dedication.label.attrib = label.attribute?
 dedication.info = docbook.info
 db.dedication =
-  element dedication { dedication.info, component.contentmodel }
+  element dedication { dedication.info, blocks+ }
 
 colophon.status.attrib = status.attribute?
+colophon.label.attrib = label.attribute?
 colophon.info = docbook.info
 db.colophon =
-   element colophon { colophon.info, component.contentmodel }
+   element colophon { colophon.info, blocks+ }
 
-toc.pagenum.attrib = pagenum.attribute?
-toc.linkend.attrib = linkend.attribute?
-
-toc.info = docbook.info
+toc.info = docbook.info.titleonly
 db.toc = element toc { toc.info, blocks*, (db.tocdiv | db.tocentry)* }
 
 tocdiv.pagenum.attrib = pagenum.attribute?
@@ -69,33 +71,37 @@ tocentry.linkend.attrib = linkend.attribute?
 db.tocentry = element tocentry { inlines* }
 
 appendix.status.attrib = status.attribute?
+appendix.label.attrib = label.attribute?
 appendix.info = docbook.info.titlereq
 db.appendix =
    element appendix { appendix.info, component.contentmodel }
 
 chapter.status.attrib = status.attribute?
+chapter.label.attrib = label.attribute?
 chapter.info = docbook.info.titlereq
 db.chapter =
    element chapter { chapter.info, component.contentmodel }
 
+part.components = navigation.components | components
+
 part.status.attrib = status.attribute?
+part.label.attrib = label.attribute?
 part.info = docbook.info.titlereq
 db.part =
    element part {
       part.info,
       db.partintro?,
-      (navigation.components | components | db.refentry | db.reference)+
+      part.components+
    }
 
 preface.status.attrib = status.attribute?
+preface.label.attrib = label.attribute?
 preface.info = docbook.info
 db.preface =
    element preface { preface.info, component.contentmodel }
 
-reference.status.attrib = status.attribute?
-reference.info = docbook.info.titlereq
-db.reference =
-   element reference { reference.info, db.partintro?, db.refentry+ }
+partintro.status.attrib = status.attribute?
+partintro.label.attrib = label.attribute?
 
 partintro.info = docbook.info
 db.partintro =
@@ -103,22 +109,25 @@ db.partintro =
 
 sections.optional = db.section* | db.simplesect*
 
-sections.required = db.section+ | db.simplesect*
+sections.required = db.section+ | db.simplesect+
 
 blocks.or.sections =
   (blocks+, sections.optional) | sections.required
 
 section.status.attrib = status.attribute?
+section.label.attrib = label.attribute?
 section.info = docbook.info.titlereq
 db.section =
   element section { section.info, blocks.or.sections }
 
 simplesect.status.attrib = status.attribute?
+simplesect.label.attrib = label.attribute?
 simplesect.info = docbook.info.titlereq
 db.simplesect =
   element simplesect { simplesect.info, blocks+ }
 
 bibliography.status.attrib = status.attribute?
+bibliography.label.attrib = label.attribute?
 bibliography.info = docbook.info
 db.bibliography =
    element bibliography {
@@ -128,6 +137,7 @@ db.bibliography =
    }
 
 bibliodiv.status.attrib = status.attribute?
+bibliodiv.label.attrib = label.attribute?
 bibliodiv.info = docbook.info.titlereq
 db.bibliodiv =
    element bibliodiv {
@@ -137,18 +147,29 @@ db.bibliodiv =
    }
 
 glossary.status.attrib = status.attribute?
+glossary.label.attrib = label.attribute?
 glossary.info = docbook.info
 db.glossary =
-   element glossary { glossary.info, blocks*, (db.glossdiv+ | db.glossentry+) }
+   element glossary {
+      glossary.info,
+      blocks*,
+      (db.glossdiv+ | db.glossentry+),
+      db.bibliography?
+   }
 
 glossdiv.status.attrib = status.attribute?
-glossdiv.info = docbook.info
+glossdiv.label.attrib = label.attribute?
+glossdiv.info = docbook.info.titlereq
 db.glossdiv =
    element glossdiv { glossdiv.info, blocks*, db.glossentry+ }
 
 index.info = docbook.info
 db.index =
-   element index { index.info, blocks*, (db.indexdiv* | db.indexentry*) }
+   element index {
+      index.info,
+      blocks*,
+      (db.indexdiv* | db.indexentry* | db.segmentedlist)
+   }
 
 setindex.info = docbook.info
 db.setindex =
@@ -156,7 +177,7 @@ db.setindex =
 
 indexdiv.info = docbook.info.titlereq
 db.indexdiv =
-   element indexdiv { indexdiv.info, blocks*, db.indexentry+ }
+   element indexdiv { indexdiv.info, blocks*, (db.indexentry+|db.segmentedlist) }
 
 db.indexentry =
    element indexentry {
@@ -180,50 +201,13 @@ db.seeie = element seeie { inlines* }
 seealsoie.linkends.attrib = linkends.attribute?
 db.seealsoie = element seealsoie { inlines* }
 
-refsections.optional = db.refsection* | db.simplesect*
-
-refsections.required = db.refsection+ | db.simplesect*
-
-blocks.or.refsections =
-  (blocks+, refsections.optional) | refsections.required
-
-refentry.status.attrib = status.attribute?
-refentry.info = docbook.info.titleforbidden
-db.refentry =
-   element refentry {
-      refentry.info,
-      db.refmeta?,
-      db.refnamediv,
-      db.refsynopsisdiv?,
-      db.refsection+
-   }
-
-db.refmeta =
-   element refmeta { db.refentrytitle, db.manvolnum, db.refmiscinfo* }
-
-db.refmiscinfo = element refmiscinfo { docbook.text }
-
-db.refnamediv =
-   element refnamediv { db.refdescriptor?, db.refname+, db.refpurpose, db.refclass* }
-
-db.refdescriptor = element refdescriptor { inlines* }
-
-db.refname = element refname { inlines* }
+db.ackno = element ackno { para.blocks+ }
 
-db.refpurpose = element refpurpose { inlines* }
-
-db.refclass = element refclass { docbook.text }
-
-refsynopsisdiv.info = docbook.info
-db.refsynopsisdiv =
-   element refsynopsisdiv { refsynopsisdiv.info, blocks.or.refsections }
-
-refsection.status.attrib = status.attribute?
-refsection.info = docbook.info.titlereq
-db.refsection =
-  element refsection { refsection.info, blocks.or.refsections }
+article.components.optional = db.section* | db.simplesect*
+article.components.required = db.section+ | db.simplesect+
 
 article.status.attrib = status.attribute?
+article.label.attrib = label.attribute?
 article.class.attrib =
    attribute class {
       "faq"
@@ -239,9 +223,6 @@ db.article =
    element article {
       article.info,
       navigation.components*,
-      blocks.or.sections,
-      db.appendix*,
-      navigation.components*
+      ((blocks+, article.components.optional) | article.components.required),
+      (db.appendix | navigation.components | db.ackno)*
    }
-
-
diff --git a/docbook/relaxng/src/htmlform.rnc b/docbook/relaxng/src/htmlform.rnc
new file mode 100644 (file)
index 0000000..e876f3a
--- /dev/null
@@ -0,0 +1,114 @@
+# (Part of) A prototype DocBook V.next RELAX NG grammar.
+
+# This schema is a "work-in-progress". It validates a DocBook-like grammar that
+# may, in some incarnation, form the basis for DocBook V.next. Or it may not.
+# At the moment, it's just an exploration by Norm. It has utterly no normative
+# value at all.
+#
+# Author: Norman Walsh, <ndw@nwalsh.com>
+# Source: Derived from DocBook XML V4.1 and V4.2
+# Release: $Id$
+#
+
+namespace html = "http://www.w3.org/1999/xhtml"
+namespace ctrl = "http://nwalsh.com/xmlns/schema-control/"
+
+ctrl:common-attributes [ define="html.form" suppress="1" ]
+
+html.form.html.attrib = html.attrs
+html.form.action.attrib = attribute action { text }
+html.form.method.attrib = attribute method { "GET" | "POST" }?
+html.form.onsubmit.attrib = attribute onsubmit { text }?
+html.form.onreset.attrib = attribute onreset { text }?
+
+html.form = element html:form {
+   ( blocks
+    | html.input
+    | html.button
+    | html.label
+    | html.select
+    | html.textarea )+ }
+
+html.input.html.attrib = html.attrs
+html.input.type.attrib = attribute type {
+   "text"
+ | "password"
+ | "checkbox"
+ | "radio"
+ | "submit"
+ | "reset"
+ | "file"
+ | "hidden"
+ | "image"
+ | "button" }?
+html.input.name.attrib = attribute name { text }?
+html.input.value.attrib = attribute value { text }?
+html.input.checked.attrib = attribute checked { "checked" }?
+html.input.disabled.attrib = attribute disabled { "disabled" }?
+html.input.readonly.attrib = attribute readonly { "readonly" }?
+html.input.size.attrib = attribute size { text }?
+html.input.maxlength.attrib = attribute maxlength { text }?
+html.input.src.attrib = attribute src { text }?
+html.input.alt.attrib = attribute alt { text }?
+html.input.usemap.attrib = attribute usemap { text }?
+html.input.tabindex.attrib = attribute tabindex { text }?
+html.input.accesskey.attrib = attribute accesskey { text }?
+html.input.onfocus.attrib = attribute onfocus { text }?
+html.input.onblur.attrib = attribute onblur { text }?
+html.input.onselect.attrib = attribute onselect { text }?
+html.input.onchange.attrib = attribute onchange { text }?
+html.input = element html:input { empty }
+
+html.button.html.attrib = html.attrs
+html.button.name.attrib = attribute name { text }?
+html.button.value.attrib = attribute value { text }?
+html.button.type.attrib = attribute type { "button" | "submit" | "reset" }?
+html.button.disabled.attrib = attribute disabled { "disabled" }?
+html.button.tabindex.attrib = attribute tabindex { text }?
+html.button.accesskey.attrib = attribute accesskey { text }?
+html.button.onfocus.attrib = attribute onfocus { text }?
+html.button.onblur.attrib = attribute onblur { text }?
+html.button = element html:button { inlines* }
+
+html.label.html.attrib = html.attrs
+html.label.accesskey.attrib = attribute accesskey { text }?
+html.label.onfocus.attrib = attribute onfocus { text }?
+html.label.onblur.attrib = attribute onblur { text }?
+html.label = element html:label { inlines* }
+
+html.select.html.attrib = html.attrs
+html.select.name.attrib = attribute name { text }?
+html.select.size.attrib = attribute size { text }?
+html.select.multiple.attrib = attribute multiple { "multiple" }?
+html.select.disabled.attrib = attribute disabled { "disabled" }?
+html.select.tabindex.attrib = attribute tabindex { text }?
+html.select.onfocus.attrib = attribute onfocus { text }?
+html.select.onblur.attrib = attribute onblur { text }?
+html.select.onchange.attrib = attribute onchange { text }?
+html.select = element html:select { html.option+ }
+
+html.option.html.attrib = html.attrs
+html.option.selected.attrib = attribute selected { "selected" }?
+html.option.disabled.attrib = attribute disabled { "disabled" }?
+html.option.value.attrib = attribute value { text }?
+html.option = element html:option { text }
+
+html.textarea.html.attrib = html.attrs
+html.textarea.name.attrib = attribute name { text }?
+html.textarea.rows.attrib = attribute rows { text }
+html.textarea.cols.attrib = attribute cols { text }
+html.textarea.disabled.attrib = attribute disabled { "disabled" }?
+html.textarea.readonly.attrib = attribute readonly { "readonly" }?
+html.textarea.tabindex.attrib = attribute tabindex { text }?
+html.textarea.accesskey.attrib = attribute accesskey { text }?
+html.textarea.onfocus.attrib = attribute onfocus { text }?
+html.textarea.onblur.attrib = attribute onblur { text }?
+html.textarea.onselect.attrib = attribute onselect { text }?
+html.textarea.onchange.attrib = attribute onchange { text }?
+html.textarea = element html:textarea { text }
+
+mediaobject.content |= any.svg
+inlinemediaobject.content |= any.svg
+
+extension.blocks |= html.form
+extension.inlines |= html.input | html.button | html.label | html.select | html.textarea
index 684ce4af5ffd3b6533101449704458b13f055533..426af707c48914a131a0a0a6bfeb793cdf0a4861 100644 (file)
@@ -13,6 +13,7 @@
 namespace ctrl = "http://nwalsh.com/xmlns/schema-control/"
 
 html.table.model =
+   html.caption,
    (html.col* | html.colgroup*),
    html.thead?,
    html.tfoot?,
@@ -71,6 +72,15 @@ html.cellhalign &=
 html.cellvalign &=
   attribute valign { "top" | "middle" | "bottom" | "baseline" }?
 
+ctrl:common-attributes [ define="html.caption" suppress="1" ]
+
+ctrl:common-linking [ define="html.caption" suppress="1" ]
+
+ctrl:role [ define="html.caption" suppress="1" ]
+
+html.caption.html.attrib = html.attrs
+html.caption = element caption { text }
+
 html.col.html.attrib = html.attrs
 html.col.span.attrib = attribute span { text }?
 html.col.width.attrib = attribute width { text }?
@@ -83,7 +93,7 @@ html.colgroup.span.attrib = attribute span { text }?
 html.colgroup.width.attrib = attribute width { text }?
 html.colgroup.cellhalign.attrib = html.cellhalign
 html.colgroup.cellvalign.attrib = html.cellvalign
-html.colgroup = element colgroup { html.col+ }
+html.colgroup = element colgroup { html.col* }
 
 html.thead.html.attrib = html.attrs
 html.thead.cellhalign.attrib = html.cellhalign
@@ -127,7 +137,22 @@ html.td.cellhalign.attrib = html.cellhalign
 html.td.cellvalign.attrib = html.cellvalign
 html.td = element td { (inlines* | blocks*) }
 
-table.choice |= html.table
-table.contentmodel |= html.table.model
+html.informaltable.model =
+   (html.col* | html.colgroup*),
+   html.thead?,
+   html.tfoot?,
+   (html.tbody+ | html.tr+)
 
-informaltable.frame.attrib |= html.table.frame.attrib
+html.informaltable.html.attrib = html.table.html.attrib
+html.informaltable.summary.attrib = html.table.summary.attrib
+html.informaltable.width.attrib = html.table.width.attrib
+html.informaltable.border.attrib = html.table.border.attrib
+html.informaltable.frame.attrib = html.table.frame.attrib
+html.informaltable.rules.attrib = html.table.rules.attrib
+html.informaltable.cellspacing.attrib = html.table.cellspacing.attrib
+html.informaltable.cellpadding.attrib = html.table.cellpadding.attrib
+
+html.informaltable = element informaltable { html.informaltable.model }
+
+table.choice |= html.table
+informaltable.choice |= html.informaltable
index 919b8dfc0f6f45874b6c535046cb5fe00a403196..5354dae29026ce1b54668cb30f2e05dfe67c358b 100644 (file)
 
 namespace ctrl = "http://nwalsh.com/xmlns/schema-control/"
 
-msgset.info = docbook.info
+msgset.info = docbook.info.titleonly
 
 db.msgset = element msgset { msgset.info, (db.msgentry+|db.simplemsgentry+) }
 
-db.msgentry = element msgentry { db.msg+, db.msginfo, db.msgexplan* }
+db.msgentry = element msgentry { db.msg+, db.msginfo?, db.msgexplan* }
 
+simplemsgentry.audience.attrib = attribute audience { text }
+simplemsgentry.origin.attrib = attribute origin { text }
+simplemsgentry.level.attrib = attribute level { text }
 db.simplemsgentry = element simplemsgentry { db.msgtext, db.msgexplan+ }
 
-db.msg = element msg { db.title?, db.msgmain, (db.msgsub|db.msgrel)* }
+msg.info = docbook.info.titleonly
+db.msg = element msg { msg.info, db.msgmain, (db.msgsub|db.msgrel)* }
 
-db.msgmain = element msgmain { db.title?, db.msgtext }
+msgmain.info = docbook.info.titleonly
+db.msgmain = element msgmain { msgmain.info, db.msgtext }
 
-db.msgsub = element msgsub { db.title?, db.msgtext }
+msgsub.info = docbook.info.titleonly
+db.msgsub = element msgsub { msgsub.info, db.msgtext }
 
-db.msgrel = element msgrel { db.title?, db.msgtext }
+msgrel.info = docbook.info.titleonly
+db.msgrel = element msgrel { msgrel.info, db.msgtext }
 
 db.msgtext = element msgtext { blocks+ }
 
 db.msginfo = element msginfo { (db.msglevel|db.msgorig|db.msgaud)* }
 
-db.msglevel = element msglevel { ubiq.inlines* }
+db.msglevel = element msglevel { docbook.text }
 
-db.msgorig = element msgorig { ubiq.inlines* }
+db.msgorig = element msgorig { docbook.text }
 
-db.msgaud = element msgaud { ubiq.inlines* }
+db.msgaud = element msgaud { docbook.text }
 
-db.msgexplan = element msgexplan { db.title?, blocks+ }
+msgexplan.info = docbook.info.titleonly
+db.msgexplan = element msgexplan { msgexplan.info, blocks+ }
 
 technical.blocks |= db.msgset
 
index 8945b97e592738cecc64b4ebd11ace841cf9e524..22d68d2f040fcfa5f6f402088c4752af2eb6f123 100644 (file)
@@ -1,5 +1,8 @@
 # (Part of) A prototype DocBook V.next RELAX NG grammar.
 
+# Deleted:
+#   action
+
 # This schema is a "work-in-progress". It validates a DocBook-like grammar that
 # may, in some incarnation, form the basis for DocBook V.next. Or it may not.
 # At the moment, it's just an exploration by Norm. It has utterly no normative
 # Release: $Id$
 #
 
+# TEI:
+#
+# 
+#
+#
+# addrPart = address contents
+# agent = individuals or corporations?
+# bibl = bibliographic items
+# biblPart = contents of a bibliographic item
+# inter = things that can appear between or within chunks
+# chunk = blocks that can't contain themselves (contains para)
+# common = chunk and inter (things in all bases)
+# data = inline names, dates, numbers, measures, etc.
+#        (abbr, address, date, daterange, datestruct, expan, geogname, ...)
+# date = date expressions
+# demographic = elements describing demographics in a linguistic context
+#               (used person and persongroup)
+# dict.parts = inlines elements in a dictionary entry 
+# dict.toplevel = tags for blocks in a dictionary 
+# divBot = elements that can occur at the end of a division
+#          (byline, closing, epigraph, signed, ...)
+# divTop = elements that can occur at the start of a division
+#          (similar to divBot)
+# dramaFront = elements that occur at the elemenets of divisions in a drama
+#              (castlist, epilog, performance, prologue, set)
+# edit = inline for editorial corrections (deletions, edits...)
+# editIncl = same but can be anywhere (gap)
+# fm.chunk = frontmatter when no titlepage
+# front, back = level of divisions in front or back matter
+#               (divGen, dramaFront)
+# hqInter = highlighting (q, quote, cit)
+# hqPhrase = highlighting (distinct, emph, foreign, gloss, hi, mentioned, socalled,
+#                          term, title)
+# Incl = (anchor, etc.)
+# lists = listlike elements
+# listBibl = biblist
+# metadata (metadata Incl: links, certainty, index)
+# names = persons. places, things (bloc, country, goegname, personname, region, ...)
+# notes = notelike elements (footnote, remark)
+# personPart = first, surname, ...
+# phrase = inlines
+# phrase.verse = verses
+# placePart = names of places
+# seg = elements used for arbitrary segmentation (clauses, phrase, morphemes, words)
+# sgmlKeywords = att, gi
+# stageDirection = camera, caption, move, sound, tech, view
+# tpParts = title page parts (as in a written work)
+
+
 namespace ctrl = "http://nwalsh.com/xmlns/schema-control/"
+namespace rng  = "http://relaxng.org/ns/structure/1.0"
+namespace s = "http://www.ascc.net/xml/schematron"
 
 # ======================================================================
 
@@ -24,18 +78,20 @@ remap.attribute     = attribute remap { text }
 
 xreflabel.attribute = attribute xreflabel { text }
 
+role.attribute      = attribute role { text }
+
 revisionflag.attribute =
   attribute revisionflag { "changed" | "added" | "deleted" | "off" }
 
 effectivity.attributes =
-  arch.attribute,
-  condition.attribute,
-  conformance.attribute,
-  os.attribute,
-  revision.attribute,
-  security.attribute,
-  userlevel.attribute,
-  vendor.attribute
+  arch.attribute?,
+  condition.attribute?,
+  conformance.attribute?,
+  os.attribute?,
+  revision.attribute?,
+  security.attribute?,
+  userlevel.attribute?,
+  vendor.attribute?
 
 arch.attribute        = attribute arch        { text }
 condition.attribute   = attribute condition   { text }
@@ -63,7 +119,7 @@ common.attributes =
   remap.attribute?,
   xreflabel.attribute?,
   revisionflag.attribute?,
-  effectivity.attributes?
+  effectivity.attributes
 
 common.attrib.idreq =
   id.attribute,
@@ -72,7 +128,7 @@ common.attrib.idreq =
   remap.attribute?,
   xreflabel.attribute?,
   revisionflag.attribute?,
-  effectivity.attributes?
+  effectivity.attributes
 
 common.linking.attributes.req =
    linkend.attribute | href.attribute
@@ -84,27 +140,36 @@ common.linking.attributes =
 
 relation.attribute = attribute relation { text }?
 
-linenumbering.attribute = attribute linenumbering { "numbered" | "unnumbered" }?
+linenumbering.attribute      = attribute linenumbering { "numbered" | "unnumbered" }
+startinglinenumber.attribute = attribute startinglinenumber { xsd:integer }
+verb-language.attribute      = attribute language { text }
+continuation.attribute       = attribute continuation { "continues" | "restarts" }
+
+verbatim.attributes &=
+   continuation.attribute?,
+   linenumbering.attribute?,
+   startinglinenumber.attribute?,
+   verb-language.attribute?
 
 float.attribute = attribute float { text }
 pgwide.attribute = attribute pgwide { "0" | "1" }
 
-data.format.attribute = attribute format { text }?
-data.fileref.attribute = attribute fileref { text }?
-data.entityref.attribute = attribute entityref { xsd:ENTITY }?
+data.format.attribute = attribute format { text }
+data.fileref.attribute = attribute fileref { text }
+data.entityref.attribute = attribute entityref { xsd:ENTITY }
 data.common.attribute &=
-   data.format.attribute,
-   data.fileref.attribute,
-   data.entityref.attribute
+   data.format.attribute?,
+   (data.fileref.attribute | data.entityref.attribute)
 
 oo-language.attribute = attribute language { text }?
 
-ctrl:other-attribute [ name="biblio"
-                       attribute-name="class"
-                       other-attribute-name="otherclass" ]
+ctrl:other-attribute [ name="biblio.class.attrib"
+                       enum-name="biblio.class-enum.attribute"
+                       other-name="biblio.class-other.attributes" ]
 
 biblio.class-enum.attribute =
-   attribute class { "doi"
+   attribute class {
+      "doi"
     | "isbn"
     | "issn"
     | "libraryofcongress"
@@ -126,14 +191,13 @@ scope.attribute = attribute scope { "all" | "global" | "local" }
 
 ubiq.inlines     = db.inlinemediaobject | db.anchor | db.indexterm | db.remark
 
-text.replaceable = element replaceable { docbook.text }
-text.phrase      = element phrase      { docbook.text }
+text.phrase      = element phrase { docbook.text }
 
-docbook.text     = (text | ubiq.inlines | text.phrase | text.replaceable)*
+docbook.text     = (text | ubiq.inlines | text.phrase | db.replaceable)*
 
 # ======================================================================
 
-inlines = text | ubiq.inlines | general.inlines | domain.inlines
+inlines = text | ubiq.inlines | general.inlines | domain.inlines | extension.inlines
 
 general.inlines =
    publishing.inlines
@@ -162,6 +226,8 @@ error.inlines =
 
 oo.inlines = db.ooclass | db.ooexception | db.oointerface
 
+# TEI: code, programlisting (x.data)
+
 programming.inlines =
    db.function
  | db.parameter
@@ -176,6 +242,8 @@ programming.inlines =
  | db.initializer
  | oo.inlines
 
+# TEI: names
+
 product.inlines =
    db.productnumber
  | db.productname
@@ -184,6 +252,8 @@ product.inlines =
  | db.hardware
  | db.trademark
 
+# TEI: x.data
+
 os.inlines =
    db.prompt
  | db.envar
@@ -192,14 +262,19 @@ os.inlines =
  | db.computeroutput
  | db.userinput
 
+# TEI: sgmlKeywords, ident
+
 markup.inlines =
    db.xmltag
  | db.markup
  | db.token
  | db.symbol
  | db.literal
+ | db.code
  | db.constant
 
+# TEI: no class
+
 bibliography.inlines =
    db.citation
  | db.citerefentry
@@ -207,12 +282,17 @@ bibliography.inlines =
  | db.citebiblioid
  | db.author
  | db.personname
+ | db.orgname
  | db.editor
 
+# TEI: no class
+
 glossary.inlines =
    db.firstterm
  | db.glossterm
 
+# TEI: hqPhrase
+
 publishing.inlines =
    db.abbrev
  | db.acronym
@@ -226,12 +306,20 @@ publishing.inlines =
  | db.superscript
  | db.wordasword
 
+# TEI: formula
+
 math.inlines = db.inlineequation
 
+# TEI: figure
+
 graphic.inlines = db.inlinemediaobject
 
+# TEI: metadata
+
 indexing.inlines = db.indexterm
 
+# TEI: 
+
 gui.inlines =
    db.guiicon
  | db.guibutton
@@ -252,14 +340,16 @@ keyboard.inlines =
 
 link.inlines =
    db.xref
+ | db.uri
  | db.anchor
 
+extension.inlines = notAllowed
+
 # ======================================================================
 
-blocks =
+blocks.nopara =
    list.blocks
  | admonition.blocks
- | para.blocks
  | formal.blocks
  | informal.blocks
  | publishing.blocks
@@ -270,6 +360,12 @@ blocks =
  | db.indexterm
  | db.bridgehead
  | db.remark
+ | db.revhistory
+
+blocks =
+   blocks.nopara
+ | para.blocks
+ | extension.blocks
 
 formal.blocks =
    db.equation
@@ -306,6 +402,9 @@ list.blocks =
  | db.procedure
  | db.simplelist
  | db.variablelist
+ | db.qandaset
+ | db.glosslist
+ | db.segmentedlist
 
 verbatim.blocks =
    db.programlisting
@@ -322,6 +421,8 @@ synopsis.blocks =
  | db.destructorsynopsis
  | db.fieldsynopsis
 
+extension.blocks = notAllowed
+
 # ======================================================================
 
 db.title = element title { inlines* }
@@ -332,39 +433,42 @@ db.subtitle = element subtitle { inlines* }
 
 docbook.title = db.title? & db.titleabbrev? & db.subtitle?
 docbook.titlereq = db.title & db.titleabbrev? & db.subtitle?
+docbook.titleonly = db.title? & db.titleabbrev?
+docbook.titleonlyreq = db.title & db.titleabbrev?
 
 info.elements =
-  db.biblioid
-  | db.artpagenums
-  | db.copyright
-  | db.subjectset
-  | db.keywordset
-  | db.subjectset
-  | db.keywordset
-  | db.itermset
-  | db.abstract
-  | db.authorgroup
-  | db.author
-  | db.editor
-  | db.othercredit
-  | db.bibliocoverage
-  | db.bibliomisc
-  | db.bibliomset
-  | db.bibliorelation
-  | db.biblioset
-  | db.collab
-  | db.confgroup
-  | db.date
-  | db.pubdate
-  | db.edition
-  | db.volumenum
-  | db.seriesvolnums
-  | db.pagenums
-  | db.legalnotice
-  | db.publisher
-  | db.releaseinfo
-  | db.revhistory
-  | db.printhistory
+   db.biblioid
+ | db.artpagenums
+ | db.copyright
+ | db.subjectset
+ | db.keywordset
+ | db.subjectset
+ | db.keywordset
+ | db.itermset
+ | db.abstract
+ | db.authorgroup
+ | db.author
+ | db.editor
+ | db.othercredit
+ | db.bibliocoverage
+ | db.bibliomisc
+ | db.bibliomset
+ | db.bibliorelation
+ | db.biblioset
+ | db.collab
+ | db.confgroup
+ | db.date
+ | db.pubdate
+ | db.edition
+ | db.volumenum
+ | db.issuenum
+ | db.seriesvolnums
+ | db.pagenums
+ | db.legalnotice
+ | db.publisher
+ | db.releaseinfo
+ | db.revhistory
+ | db.printhistory
 
 bibliographic.elements =
    info.elements
@@ -389,12 +493,75 @@ db.bibliomixed = element bibliomixed { (text | bibliographic.elements)* }
 
 db.info = element info { docbook.title, info.elements* }
 db.info.titlereq = element info { docbook.titlereq, info.elements* }
+db.info.titleonly = element info { docbook.titleonly, info.elements* }
+db.info.titleonlyreq = element info { docbook.titleonlyreq, info.elements* }
 db.info.titleforbidden = element info { info.elements* }
 
 docbook.info = (docbook.titlereq?, db.info.titleforbidden?) | db.info?
 docbook.info.titlereq = (docbook.titlereq, db.info.titleforbidden?) | db.info.titlereq
+docbook.info.titleonly = (docbook.titleonly, db.info.titleforbidden?) | db.info.titleonly
+docbook.info.titleonlyreq = (docbook.titleonlyreq, db.info.titleforbidden?) | db.info.titleonlyreq
 docbook.info.titleforbidden = db.info.titleforbidden?
 
+ctrl:alternate-define [
+   name="docbook.title"
+   rng:optional [
+      rng:ref [ name = "db.title" ]
+   ]
+   rng:optional [
+      rng:ref [ name = "db.titleabbrev" ]
+   ]
+   rng:optional [
+      rng:ref [ name = "db.subtitle" ]
+   ]
+]
+
+ctrl:alternate-define [
+   name="docbook.titlereq"
+   rng:ref [ name="db.title" ]
+   rng:optional [
+      rng:ref [ name = "db.titleabbrev" ]
+   ]
+   rng:optional [
+      rng:ref [ name = "db.subtitle" ]
+   ]
+]
+
+ctrl:alternate-define [
+   name="db.info"
+   rng:element [
+      name="info"
+      rng:zeroOrMore [
+         rng:choice [
+            rng:ref [ name = "docbook.title" ]
+            rng:ref [ name = "info.elements" ]
+         ]
+      ]
+   ]
+]
+
+ctrl:alternate-define [
+   name = "docbook.info"
+   rng:optional [
+      rng:ref [ name = "db.info" ]
+   ]
+]
+
+ctrl:alternate-define [
+   name = "docbook.info.titlereq"
+   rng:ref [ name = "docbook.titlereq" ]
+   rng:optional [
+      rng:ref [ name = "db.info" ]
+   ]
+]
+
+ctrl:alternate-define [
+   name = "docbook.info.titleforbidden"
+   rng:optional [
+      rng:ref [ name = "db.info" ]
+   ]
+]
+
 biblioset.relation.attrib = relation.attribute
 db.biblioset = element biblioset { bibliographic.elements+ }
 
@@ -403,51 +570,30 @@ db.bibliomset = element bibliomset { (docbook.text | bibliographic.elements)* }
 
 db.bibliomisc = element bibliomisc { docbook.text }
 
-subjectset.scheme.attrib = attribute scheme { text }?
+subjectset.scheme.attrib = attribute scheme { xsd:NMTOKEN }?
 db.subjectset = element subjectset { db.subject+ }
 
 subject.weight.attrib = attribute weight { text }?
 db.subject = element subject { db.subjectterm+ }
 
-db.subjectterm = element subjectterm { docbook.text }
+db.subjectterm = element subjectterm { text }
 
 db.keywordset = element keywordset { db.keyword+ }
 
-db.keyword = element keyword { docbook.text }
-
-db.itermset = element itermset { db.indexterm+ }
-
-task.info = docbook.info.titlereq
-
-db.task = element task { task.info,
-                         db.tasksummary?,
-                        db.taskprerequisites?,
-                        db.procedure,
-                        db.example*,
-                        db.taskrelated? }
+db.keyword = element keyword { text }
 
-tasksummary.info = docbook.info
-
-db.tasksummary = element tasksummary { tasksummary.info, blocks+ }
-
-taskprerequisites.info = docbook.info
-
-db.taskprerequisites = element taskprerequisites { taskprerequisites.info, blocks+ }
-
-taskrelated.info = docbook.info
-
-db.taskrelated = element taskrelated { taskrelated.info, blocks+ }
+db.itermset = element itermset { indexterm.singular+ }
 
 qandaset.defaultlabel.attrib = attribute defaultlabel { "none" | "number" | "qanda" }?
-qandaset.info = docbook.info
+qandaset.info = docbook.info.titleonly
 db.qandaset =
-   element qandaset { qandaset.info, blocks*, (db.qandadiv | db.qandaentry)+ }
+   element qandaset { qandaset.info, blocks*, (db.qandadiv+ | db.qandaentry+) }
 
-qandadiv.info = docbook.info
+qandadiv.info = docbook.info.titleonly
 db.qandadiv =
-   element qandadiv { qandadiv.info, blocks*, (db.qandadiv | db.qandaentry)+ }
+   element qandadiv { qandadiv.info, blocks*, (db.qandadiv+ | db.qandaentry+) }
 
-qandaentry.info = docbook.info
+qandaentry.info = docbook.info.titleforbidden
 db.qandaentry =
    element qandaentry { qandaentry.info, db.question, db.answer* }
 
@@ -458,52 +604,60 @@ db.answer = element answer { db.label?, blocks+ }
 db.label = element label { docbook.text }
 
 table.choice = notAllowed
-table.contentmodel = notAllowed
+informaltable.choice = notAllowed
 
 db.table = table.choice
+db.informaltable = informaltable.choice
 
-informaltable.tabstyle.attrib = notAllowed?
-informaltable.orient.attrib = notAllowed?
-informaltable.colsep.attrib = notAllowed?
-informaltable.rowsep.attrib = notAllowed?
-informaltable.frame.attrib = notAllowed?
-informaltable.pgwide.attrib = notAllowed?
-
-informaltable.info = db.info.titleforbidden
-db.informaltable = element informaltable { informaltable.info?, table.contentmodel }
-
-procedure.info = docbook.info
+procedure.info = docbook.info.titleonly
 db.procedure = element procedure { procedure.info, blocks*, db.step+ }
 
 step.performance.attrib = attribute performance { "optional" | "required" }?
+step.info = docbook.info.titleonly
+db.step = element step {
+   step.info,
+   blocks*,
+   (db.substeps|db.stepalternatives)?,
+   blocks* }
 
-step.info = docbook.info
-db.step = element step { step.info, blocks*, db.substeps?, blocks* }
+stepalternatives.performance.attrib = attribute performance { "optional" | "required" }?
+stepalternatives.info = docbook.info.titleforbidden
+db.stepalternatives = element stepalternatives { stepalternatives.info, db.step+ }
 
 substeps.performance.attrib = attribute performance { "optional" | "required" }?
-
 db.substeps = element substeps { db.step+ }
 
-sidebar.info = docbook.info
+ctrl:exclude [ from="db.sidebar" exclude="db.sidebar" ]
+
+sidebar.info = docbook.info.titleonly
 
 db.sidebar = element sidebar { sidebar.info, blocks+ }
 
-abstract.info = docbook.info
+abstract.info = docbook.info.titleonly
 db.abstract = element abstract { abstract.info, para.blocks+ }
 
-personblurb.info = docbook.info
+personblurb.info = docbook.info.titleonly
 db.personblurb = element personblurb { personblurb.info, para.blocks+ }
 
-blockquote.info = docbook.info
+blockquote.info = docbook.info.titleonly
 db.blockquote = element blockquote { blockquote.info, db.attribution?, blocks+ }
 
 db.attribution = element attribution { (docbook.text | db.personname) }
 
+bridgehead.renderas.attrib =
+   attribute renderas {
+      "other"
+    | "sect1"
+    | "sect2"
+    | "sect3"
+    | "sect4"
+    | "sect5" }?
+
 db.bridgehead = element bridgehead { inlines* }
 
 db.remark = element remark { docbook.text }
 
-epigraph.info = docbook.info
+epigraph.info = docbook.info.titleforbidden
 
 db.epigraph =
    element epigraph {
@@ -512,29 +666,36 @@ db.epigraph =
       (para.blocks | db.literallayout)+
    }
 
-db.footnote = element footnote { blocks* }
+ctrl:exclude [ from="db.footnote" exclude="db.footnote" ]
+
+db.footnote = element footnote { blocks+ }
 
-db.highlights = element highlights { blocks* }
+db.highlights = element highlights {
+   (list.blocks | admonition.blocks | para.blocks | db.indexterm)+
+}
 
 para.blocks =
-   db.para
+   db.anchor
+ | db.para
  | db.formalpara
  | db.simpara
 
-formalpara.info = docbook.info.titlereq
-db.formalpara = element formalpara { formalpara.info, db.para }
+formalpara.info = docbook.info.titleonlyreq
+db.formalpara = element formalpara { formalpara.info, db.indexterm*, db.para }
 
 para.info = docbook.info.titleforbidden
-db.para = element para { para.info, (inlines | blocks)* }
+db.para = element para { para.info, (inlines | blocks.nopara)* }
 
 simpara.info = docbook.info.titleforbidden
 db.simpara = element simpara { simpara.info, inlines* }
 
 # admonitions are not excluded from themselves
-admonition.contentmodel = docbook.info, blocks+
+admonition.contentmodel = docbook.info.titleonly, blocks+
 
 db.caution = element caution { admonition.contentmodel }
 
+ctrl:exclude [ from="admonition.blocks" exclude="admonition.blocks" ]
+
 db.important = element important { admonition.contentmodel }
 
 db.note = element note { admonition.contentmodel }
@@ -543,7 +704,8 @@ db.tip = element tip { admonition.contentmodel }
 
 db.warning = element warning { admonition.contentmodel }
 
-db.glosslist = element glosslist { db.glossentry+ }
+glosslist.info = docbook.info.titleonly
+db.glosslist = element glosslist { glosslist.info?, blocks*, db.glossentry+ }
 
 glossentry.sortas.attrib = sortas.attribute?
 db.glossentry =
@@ -551,6 +713,7 @@ db.glossentry =
       db.glossterm,
       db.acronym?,
       db.abbrev?,
+      db.indexterm*,
       (db.glosssee | db.glossdef+)
    }
 
@@ -558,47 +721,79 @@ glossdef.subject.attrib = attribute subject { text }?
 db.glossdef = element glossdef { blocks+, db.glossseealso* }
 
 glosssee.otherterm.attrib = attribute otherterm { xsd:IDREF }?
-db.glosssee = element glosssee { inlines* }
+db.glosssee =
+   [
+      s:rule [
+         context = "glosssee[@linkend]"
+         s:assert [
+            test = "name(//*[@id=current()/@linkend]) = 'glossentry'"
+            "@linkend on glosssee must point to a glossentry."
+         ]
+      ]
+   ]
+   element glosssee { inlines* }
 
 glossseealso.otherterm.attrib = attribute otherterm { xsd:IDREF }?
-db.glossseealso = element glossseealso { inlines* }
+db.glossseealso =
+   [
+      s:rule [
+         context = "glossseealso[@linkend]"
+         s:assert [
+            test = "name(//*[@id=current()/@linkend]) = 'glossentry'"
+            "@linkend on glossseealso must point to a glossentry."
+         ]
+      ]
+   ]
+   element glossseealso { inlines* }
 
 itemizedlist.mark.attrib = attribute mark { text }?
 itemizedlist.spacing.attrib = attribute spacing { "compact" | "normal" }?
 
-itemizedlist.info = docbook.info
+itemizedlist.info = docbook.info.titleonly
 db.itemizedlist = element itemizedlist { itemizedlist.info, blocks*, db.listitem+ }
 
 orderedlist.inheritnum.attrib = attribute inheritnum { "ignore" | "inherit" }?
 orderedlist.spacing.attrib = attribute spacing { "compact" | "normal" }?
-orderedlist.continuation.attrib = attribute continuation { "continues" | "restarts" }?
+orderedlist.continuation.attrib = continuation.attribute?
 orderedlist.numeration.attrib = attribute numeration { text }?
 
-orderedlist.info = docbook.info
+orderedlist.info = docbook.info.titleonly
 db.orderedlist = element orderedlist { orderedlist.info, blocks*, db.listitem+ }
 
 listitem.override.attrib = attribute override { text }?
 db.listitem = element listitem { blocks+ }
 
-segmentedlist.info = docbook.info
-db.segmentedlist = element segmentedlist { segmentedlist.info,
-                                           db.segtitle+,
-                                           db.seglistitem+ }
+segmentedlist.info = docbook.info.titleonly
+db.segmentedlist =
+   element segmentedlist {
+      segmentedlist.info,
+      db.segtitle+,
+      db.seglistitem+ }
 
 db.segtitle = element segtitle { inlines* }
 
-db.seglistitem = element seglistitem { db.seg+ }
-
-db.seg = element seg { (inlines | blocks)* }
-
-simplelist.type.attrib = attribute type { "horiz" | "inline" | "vert" }?
-
+db.seglistitem =
+   [
+      s:rule [
+         context = "seglistitem"
+         s:assert [
+            test = "count(seg) = count(../segtitle)"
+            "The number of seg elements must be the same as the number of segtitle elements in the parent segmentedlist"
+         ]
+      ]
+   ]
+   element seglistitem { db.seg+ }
+
+db.seg = element seg { inlines* }
+
+simplelist.type.attrib = attribute type { "horiz" | "vert" | "inline" }?
+simplelist.columns.attrib = attribute columns { xsd:integer}?
 db.simplelist = element simplelist { db.member+ }
 
 db.member = element member { inlines* }
 
 variablelist.termlength.attrib = attribute termlength { text }?
-variablelist.info = db.info
+variablelist.info = docbook.info.titleonly
 
 db.variablelist = element variablelist { variablelist.info, blocks*, db.varlistentry+ }
 
@@ -606,24 +801,34 @@ db.varlistentry = element varlistentry { db.term+, db.listitem }
 
 db.term = element term { inlines* }
 
-example.info = db.info.titlereq
+floatstyle.attribute = attribute floatstyle { text }
+
+example.floatstyle.attrib = floatstyle.attribute?
+example.width.attrib = attribute width { text }?
+example.label.attrib = attribute label { text }?
+
+example.info = docbook.info.titleonlyreq
 db.example = element example { example.info, blocks+ }
 
-informalexample.info = db.info.titleforbidden
+informalexample.info = docbook.info.titleforbidden
+informalexample.width.attrib = attribute width { text }?
+informalexample.floatstyle.attrib = floatstyle.attribute?
 db.informalexample = element informalexample { informalexample.info, blocks+ }
 
 verbatim.inlines = inlines | db.lineannotation
 
-verbatim.contentmodel = docbook.info.titleforbidden, verbatim.inlines*
+verbatim.contentmodel = docbook.info.titleforbidden, (db.textobject|verbatim.inlines*)
 
-programlisting.linenumbering.attrib = linenumbering.attribute
+programlisting.verbatim.attribs = verbatim.attributes
+programlisting.width.attrib = attribute width { text }?
 db.programlisting = element programlisting { verbatim.contentmodel }
 
-literallayout.linenumbering.attrib = linenumbering.attribute
-literallayout.class.attrib = attribute class { "monospaced" | "normal" }
+literallayout.verbatim.attribs = verbatim.attributes
+literallayout.class.attrib = attribute class { "monospaced" | "normal" }?
 db.literallayout = element literallayout { verbatim.contentmodel }
 
-screen.linenumbering.attrib = linenumbering.attribute
+screen.verbatim.attribs = verbatim.attributes
+screen.width.attrib = attribute width { text }?
 db.screen = element screen { verbatim.contentmodel }
 
 screenshot.block = db.mediaobject
@@ -632,48 +837,66 @@ screenshot.info = docbook.info
 db.screenshot =
    element screenshot { screenshot.info, screenshot.block }
 
-figure.float.attrib = float.attribute?
+figure.floatstyle.attrib = floatstyle.attribute?
+figure.float.attrib = attribute float { text }?
 figure.pgwide.attrib = pgwide.attribute?
-figure.info = db.info.titlereq
+figure.label.attrib = attribute label { text }?
+figure.info = docbook.info.titleonlyreq
 db.figure = element figure { figure.info, blocks+ }
 
+informalfigure.floatstyle.attrib = floatstyle.attribute?
 informalfigure.float.attrib = float.attribute?
 informalfigure.pgwide.attrib = pgwide.attribute?
-informalfigure.info = db.info.titleforbidden
+informalfigure.label.attrib = attribute label { text }?
+informalfigure.info = docbook.info.titleforbidden
 db.informalfigure = element informalfigure { informalfigure.info, blocks+ }
 
-mediaobject.info = db.info
+mediaobject.content =
+   db.videoobject | db.audioobject | db.imageobject | db.textobject
+
+mediaobject.info = docbook.info.titleforbidden
 db.mediaobject =
-   element mediaobject {
-      mediaobject.info,
-      (db.videoobject | db.audioobject | db.imageobject | db.textobject)+
-   }
+   element mediaobject { mediaobject.info, mediaobject.content+ }
+
+inlinemediaobject.content =
+   db.videoobject | db.audioobject | db.imageobject | db.textobject
 
-inlinemediaobject.info = db.info
+inlinemediaobject.info = docbook.info.titleforbidden
 db.inlinemediaobject =
-   element inlinemediaobject {
-      inlinemediaobject.info,
-      (db.videoobject | db.audioobject | db.imageobject | db.textobject)+
-   }
+   element inlinemediaobject { inlinemediaobject.info, inlinemediaobject.content+ }
 
-videoobject.info = db.info
+videoobject.info = docbook.info.titleforbidden
 db.videoobject = element videoobject { videoobject.info, db.videodata }
 
-audioobject.info = db.info
+audioobject.info = docbook.info.titleforbidden
 db.audioobject = element audioobject { audioobject.info, db.audiodata }
 
-imageobject.info = db.info
-db.imageobject = element imageobject { imageobject.info, db.imagedata }
+imageobject.content = db.imagedata
+
+imageobject.info = docbook.info.titleforbidden
+db.imageobject = element imageobject { imageobject.info, imageobject.content }
 
-textobject.info = db.info
+textobject.info = docbook.info.titleforbidden
 db.textobject =
    element textobject { textobject.info, (db.phrase | db.textdata | blocks+) }
 
 videodata.data.attrib = data.common.attribute
-db.videodata = element videodata { db.info.titleforbidden? }
+videodata.align.attrib =
+  attribute align { "center" | "char" | "justify" | "left" | "right" }?
+videodata.valign.attrib = attribute valign { "bottom" | "middle" | "top" }?
+videodata.width.attrib = attribute width { text }?
+videodata.contentwidth.attrib = attribute contentwidth { text }?
+videodata.scalefit.attrib = attribute scalefit { "0" | "1" }?
+vidoedata.scale.attrib = attribute scale { text }?
+videodata.depth.attrib = attribute depth { text }?
+videodata.contentdepth.attrib = attribute contentdepth { text }?
+
+videodata.info = docbook.info.titleforbidden
+db.videodata = element videodata { videodata.info }
 
 audiodata.data.attrib = data.common.attribute
-db.audiodata = element audiodata { db.info.titleforbidden? }
+audiodata.info = docbook.info.titleforbidden
+db.audiodata = element audiodata { audiodata.info }
 
 imagedata.data.attrib = data.common.attribute
 imagedata.align.attrib =
@@ -682,25 +905,27 @@ imagedata.valign.attrib = attribute valign { "bottom" | "middle" | "top" }?
 imagedata.width.attrib = attribute width { text }?
 imagedata.contentwidth.attrib = attribute contentwidth { text }?
 imagedata.scalefit.attrib = attribute scalefit { "0" | "1" }?
+imagedata.scale.attrib = attribute scale { text }?
 imagedata.depth.attrib = attribute depth { text }?
 imagedata.contentdepth.attrib = attribute contentdepth { text }?
 
-db.imagedata = element imagedata { db.info.titleforbidden? }
+imagedata.info = docbook.info.titleforbidden
+db.imagedata = element imagedata { imagedata.info }
 
 textdata.data.attrib = data.common.attribute
 textdata.encoding.attrib = attribute encoding { text }?
 
-db.textdata = element textdata { db.info.titleforbidden? }
+textdata.info = docbook.info.titleforbidden
+db.textdata = element textdata { textdata.info }
 
-db.caption = element caption { inlines* | blocks+ }
+db.caption = element caption { blocks+ }
 
 equation.content = db.mediaobject
 
-equation.info = docbook.info.titlereq
+equation.info = docbook.info.titleonlyreq
 db.equation = element equation { equation.info, equation.content+ }
 
-informalequation.info = db.info.titleforbidden
-
+informalequation.info = docbook.info.titleforbidden
 db.informalequation =
    element informalequation {
       informalequation.info,
@@ -711,18 +936,18 @@ inlineequation.content = db.inlinemediaobject
 
 db.inlineequation = element inlineequation { inlineequation.content+ }
 
-db.alt = element alt { text }
-
-synopsis.linenumbering.attrib = linenumbering.attribute
+synopsis.verbatim.attribs = verbatim.attributes
+synopsis.label.attrib = attribute label { text }
 db.synopsis = element synopsis { verbatim.contentmodel }
 
 cmdsynopsis.sepchar.attrib = attribute sepchar { text }?
 cmdsynopsis.cmdlength.attrib = attribute cmdlength { text }?
+cmdsynopsis.label.attrib = attribute label { text }?
 
-cmdsynopsis.info = db.info
+cmdsynopsis.info = docbook.info.titleforbidden
 db.cmdsynopsis =
    element cmdsynopsis {
-      cmdsynopsis.info,
+      cmdsynopsis.info?,
       (db.command | db.arg | db.group | db.sbr)+,
       db.synopfragment*
    }
@@ -730,8 +955,8 @@ db.cmdsynopsis =
 rep.attribute = attribute rep { "norepeat" | "repeat" }
 choice.attribute = attribute choice { "opt" | "plain" | "req" }
 
-arg.rep.attrib = rep.attribute
-arg.choice.attrib = choice.attribute
+arg.rep.attrib = rep.attribute?
+arg.choice.attrib = choice.attribute?
 
 db.arg =
    element arg {
@@ -744,37 +969,49 @@ db.arg =
    }
 
 
-group.rep.attrib = rep.attribute
-group.choice.attrib = choice.attribute
+group.rep.attrib = rep.attribute?
+group.choice.attrib = choice.attribute?
 
 db.group =
    element group {
-      (db.arg | db.group | db.option | db.synopfragmentref | db.sbr)+
+      (db.arg | db.group | db.option | db.synopfragmentref | db.replaceable | db.sbr)+
    }
 
-db.sbr = element sbr { empty }
+ctrl:common-linking [ element="sbr" suppress="yes" ]
 
-ctrl:common-attributes [ element="synopfragment" attributes="common.attrib.idreq" ]
+db.sbr = element sbr { empty }
 
 db.synopfragment = element synopfragment { (db.arg | db.group)+ }
 
 synopfragmentref.linkend.attrib = linkend.attribute
-db.synopfragmentref = element synopfragmentref { docbook.text }
-
-funcsynopsis.info = db.info
+db.synopfragmentref =
+   [
+      s:rule [
+         context = "synopfragmentref"
+         s:assert [
+            test = "name(//*[@id=current()/@linkend]) = 'synopfragment'"
+            "@linkend on synopfragmentref must point to a synopfragment."
+         ]
+      ]
+   ]
+   element synopfragmentref { text }
+
+funcsynopsis.info = docbook.info.titleforbidden
 db.funcsynopsis =
    element funcsynopsis {
-      funcsynopsis.info,
+      funcsynopsis.info?,
       (db.funcsynopsisinfo | db.funcprototype)+
    }
 
-funcsynopsisinfo.linenumbering.attrib = linenumbering.attribute
+funcsynopsisinfo.verbatim.attribs = verbatim.attributes
 db.funcsynopsisinfo = element funcsynopsisinfo { verbatim.contentmodel }
 
 db.funcprototype =
    element funcprototype {
+      db.modifier*,
       db.funcdef,
-      (db.void | db.varargs | db.paramdef+)
+      (db.void | db.varargs | (db.paramdef+, db.varargs?)),
+      db.modifier*
    }
 
 db.funcdef = element funcdef { (docbook.text | db.type | db.function)* }
@@ -783,6 +1020,8 @@ db.void = element void { empty }
 
 db.varargs = element varargs { empty }
 
+paramdef.choice.attrib = attribute choice { "opt" | "req" }?
+
 db.paramdef =
    element paramdef { (docbook.text | db.type | db.parameter | db.funcparams)* }
 
@@ -794,7 +1033,7 @@ oo-method.synopsis.blocks =
 oo-field.synopsis.blocks = db.fieldsynopsis
 
 classsynopsis.language.attrib = oo-language.attribute
-classsynopsis.class.attrib = attribute class { "class" | "interface" }
+classsynopsis.class.attrib = attribute class { "class" | "interface" }?
 db.classsynopsis =
    element classsynopsis {
       oo.inlines+,
@@ -803,7 +1042,7 @@ db.classsynopsis =
        | oo-field.synopsis.blocks)*
    }
 
-classsynopsisinfo.linenumbering.attrib = linenumbering.attribute
+classsynopsisinfo.verbatim.attribs = verbatim.attributes
 db.classsynopsisinfo = element classsynopsisinfo { verbatim.contentmodel }
 
 db.ooclass = element ooclass { db.modifier*, db.classname }
@@ -834,9 +1073,8 @@ db.constructorsynopsis =
    element constructorsynopsis {
       db.modifier*,
       db.methodname?,
-      (db.methodparam+ | db.void),
-      db.exceptionname*,
-      db.modifier*
+      (db.methodparam+ | db.void?),
+      db.exceptionname*
    }
 
 destructorsynopsis.language.attrib = oo-language.attribute
@@ -844,9 +1082,8 @@ db.destructorsynopsis =
    element destructorsynopsis {
       db.modifier*,
       db.methodname?,
-      (db.methodparam+ | db.void),
-      db.exceptionname*,
-      db.modifier*
+      (db.methodparam+ | db.void?),
+      db.exceptionname*
    }
 
 methodsynopsis.language.attrib = oo-language.attribute
@@ -862,8 +1099,8 @@ db.methodsynopsis =
 
 db.methodname = element methodname { docbook.text }
 
-methodparam.rep.attrib = rep.attribute
-methodparam.choice.attrib = choice.attribute
+methodparam.rep.attrib = rep.attribute?
+methodparam.choice.attrib = choice.attribute?
 
 db.methodparam =
    element methodparam {
@@ -873,9 +1110,9 @@ db.methodparam =
       db.modifier*
    }
 
-db.ackno = element ackno { inlines* }
+# TEI: addrPart
 
-address.linenumbering.attrib = linenumbering.attribute
+address.verbatim.attribs = verbatim.attributes
 db.address =
    element address {
       (docbook.text
@@ -888,7 +1125,8 @@ db.address =
        | db.country
        | db.phone
        | db.fax
-       | db.email)*
+       | db.email
+       | db.otheraddr)*
    }
 
 db.street = element street { docbook.text }
@@ -899,30 +1137,39 @@ db.state = element state { docbook.text }
 db.country = element country { docbook.text }
 db.phone = element phone { docbook.text }
 db.fax = element fax { docbook.text }
+db.otheraddr = element otheraddr { docbook.text }
 
 db.affiliation =
    element affiliation {
       db.shortaffil?,
       db.jobtitle*,
       db.orgname?,
-      db.orgdiv?,
+      db.orgdiv*,
       db.address*
    }
 
-db.shortaffil = element shortaffil { inlines* }
+db.shortaffil = element shortaffil { docbook.text }
 
 db.jobtitle = element jobtitle { docbook.text }
 
-orgname.class.attrib =
+ctrl:other-attribute [ name="orgname.class.attrib"
+                       enum-name="orgname.class-enum.attribute"
+                       other-name="orgname.class-other.attributes" ]
+
+orgname.class-enum.attribute =
    attribute class {
       "consortium"
     | "corporation"
     | "informal"
-    | "nonprofit"
-    | "other"
-   }?
+    | "nonprofit" }?
 
-db.orgname = element orgname { inlines* }
+orgname.class-other.attributes =
+   attribute class { "other" },
+   attribute otherclass { text }
+
+orgname.class.attrib = (orgname.class-enum.attribute | orgname.class-other.attributes)
+
+db.orgname = element orgname { docbook.text }
 
 db.orgdiv = element orgdiv { inlines* }
 
@@ -930,12 +1177,12 @@ db.artpagenums = element artpagenums { docbook.text }
 
 db.personname =
    element personname {
-      (docbook.text
-       | (db.honorific
-        | db.firstname
-        | db.surname
-        | db.lineage
-        | db.othername)+)
+      docbook.text
+    | (db.honorific
+     | db.firstname
+     | db.surname
+     | db.lineage
+     | db.othername)+
    }
 
 person.author =
@@ -975,15 +1222,15 @@ db.confgroup =
 
 db.confdates = element confdates { docbook.text }
 
-db.conftitle = element conftitle { inlines* }
+db.conftitle = element conftitle { docbook.text }
 
 db.confnum = element confnum { docbook.text }
 
-db.confsponsor = element confsponsor { inlines* }
+db.confsponsor = element confsponsor { docbook.text }
 
-db.contractnum = element contractnum { inlines* }
+db.contractnum = element contractnum { docbook.text }
 
-db.contractsponsor = element contractsponsor { inlines* }
+db.contractsponsor = element contractsponsor { docbook.text }
 
 db.copyright = element copyright { db.year+, db.holder* }
 
@@ -1009,9 +1256,9 @@ db.bibliosource = element bibliosource { docbook.text }
 
 bibliorelation.class.attrib = biblio.class.attrib
 
-ctrl:other-attribute [ name="bibliorelation"
-                       attribute-name="type"
-                       other-attribute-name="othertype" ]
+ctrl:other-attribute [ name="bibliorelation.type.attrib"
+                       enum-name="bibliorelation.type-enum.attribute"
+                       other-name="bibliorelation.type-other.attributes" ]
 
 bibliorelation.type-enum.attribute =
    attribute type { "hasformat"
@@ -1037,43 +1284,55 @@ bibliorelation.type.attrib =
 
 db.bibliorelation = element bibliorelation { docbook.text }
 
-ctrl:other-attribute [ name="bibliocoverage"
-                       attribute-name="spatial"
-                       other-attribute-name="otherspacial" ]
+ctrl:other-attribute [ name="bibliocoverage.spatial.attrib"
+                       enum-name="bibliocoverage.spatial-enum.attribute"
+                       other-name="bibliocoverage.spatial-other.attributes" ]
 
 bibliocoverage.spatial-enum.attribute =
    attribute spatial {
       "dcmipoint" | "iso3166" | "dcmibox" | "tgn"
-   }?
+   }
 
 bibliocoverage.spatial-other.attributes =
    attribute spatial { "otherspatial" },
-   attribute otherspacial { xsd:NMTOKEN }
+   attribute otherspatial { xsd:NMTOKEN }
 
-bibliocoverage.spatial.attrib =
+bibliocoverage.spatial.attrs =
    (bibliocoverage.spatial-enum.attribute | bibliocoverage.spatial-other.attributes)
 
-ctrl:other-attribute [ name="bibliocoverage"
-                       attribute-name="temporal"
-                       other-attribute-name="othertemporal" ]
+ctrl:other-attribute [ name="bibliocoverage.temporal.attrib"
+                       enum-name="bibliocoverage.temporal-enum.attribute"
+                       other-name="bibliocoverage.temporal-other.attributes" ]
 
 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.attrs =
    (bibliocoverage.temporal-enum.attribute | bibliocoverage.temporal-other.attributes)
 
+bibliocoverage.coverage.attrib =
+   (bibliocoverage.spatial.attrs | bibliocoverage.temporal.attrs)
+ | (bibliocoverage.spatial.attrs & bibliocoverage.temporal.attrs)
+
 db.bibliocoverage = element bibliocoverage { docbook.text }
 
-legalnotice.info = docbook.info
+legalnotice.info = docbook.info.titleonly
 db.legalnotice = element legalnotice { legalnotice.info, blocks+ }
 
+othercredit.class.attrib = attribute class {
+   "copyeditor"
+ | "graphicdesigner"
+ | "other"
+ | "productioneditor"
+ | "technicaleditor"
+ | "translator" }?
+
 db.othercredit = element othercredit { credit.contentmodel }
 
 db.pagenums = element pagenums { docbook.text }
@@ -1092,19 +1351,21 @@ db.othername = element othername { docbook.text }
 
 db.printhistory = element printhistory { para.blocks+ }
 
+productname.class.attrib = attribute class {
+   "copyright" | "registered" | "service" | "trade" }?
 db.productname = element productname { docbook.text }
 
 db.productnumber = element productnumber { docbook.text }
 
 db.pubdate = element pubdate { docbook.text }
 
-db.publisher = element publisher { (docbook.text | (db.publishername, db.address*)) }
+db.publisher = element publisher { db.publishername, db.address* }
 
 db.publishername = element publishername { docbook.text }
 
 db.releaseinfo = element releaseinfo { docbook.text }
 
-revhistory.info = docbook.info
+revhistory.info = docbook.info.titleonly
 db.revhistory = element revhistory { revhistory.info, db.revision+ }
 
 db.revision =
@@ -1117,7 +1378,7 @@ db.revision =
 
 db.revnumber = element revnumber { docbook.text }
 
-db.revremark = element revremark { inlines* }
+db.revremark = element revremark { docbook.text }
 
 db.revdescription = element revdescription { blocks* }
 
@@ -1125,6 +1386,8 @@ db.seriesvolnums = element seriesvolnums { docbook.text }
 
 db.volumenum = element volumenum { docbook.text }
 
+db.issuenum = element issuenum { docbook.text }
+
 db.accel  = element accel { docbook.text }
 
 application.class.attrib = attribute class { "hardware" | "software" }?
@@ -1134,13 +1397,30 @@ db.classname = element classname { docbook.text }
 
 db.command = element command { inlines* }
 
-computeroutput.inlines = inlines
+computeroutput.inlines = (inlines|db.co)
 
 db.computeroutput = element computeroutput { computeroutput.inlines* }
 
 database.class.attrib =
    attribute class {
-      "field" | "key1" | "key2" | "name" | "record" | "table"
+      "altkey"
+    | "constraint"
+    | "datatype"
+    | "field"
+    | "foreignkey"
+    | "group"
+    | "index"
+    | "key1"
+    | "key2"
+    | "name"
+    | "primarykey"
+    | "procedure"
+    | "record"
+    | "rule"
+    | "secondarykey"
+    | "table"
+    | "user"
+    | "view"
    }?
 db.database = element database { docbook.text }
 
@@ -1152,7 +1432,7 @@ db.errorcode = element errorcode { docbook.text }
 
 db.errorname = element errorname { docbook.text }
 
-db.errortext = element errortext { inlines* }
+db.errortext = element errortext { docbook.text }
 
 db.errortype = element errortype { docbook.text }
 
@@ -1171,27 +1451,62 @@ db.filename = element filename { docbook.text }
 
 db.function = element function { docbook.text }
 
-db.guibutton = element guibutton { docbook.text }
+db.guibutton = element guibutton { (docbook.text | db.accel)* }
 
-db.guiicon = element guiicon { docbook.text }
+db.guiicon = element guiicon { (docbook.text | db.accel)* }
 
-db.guilabel = element guilabel { docbook.text }
+db.guilabel = element guilabel { (docbook.text | db.accel)* }
 
-db.guimenu = element guimenu { docbook.text }
+db.guimenu = element guimenu { (docbook.text | db.accel)* }
 
-db.guimenuitem =  element guimenuitem { docbook.text }
+db.guimenuitem =  element guimenuitem { (docbook.text | db.accel)* }
 
-db.guisubmenu = element guisubmenu { docbook.text }
+db.guisubmenu = element guisubmenu { (docbook.text | db.accel)* }
 
 db.hardware = element hardware { docbook.text }
 
+ctrl:other-attribute [ name="keycap.function.attrib"
+                       enum-name="keycap.function-enum.attribute"
+                       other-name="keycap.function-other.attributes" ]
+
+keycap.function-enum.attribute =
+   attribute function {
+      "alt"
+    | "backspace"
+    | "command"
+    | "control"
+    | "delete"
+    | "down"
+    | "end"
+    | "enter"
+    | "escape"
+    | "home"
+    | "insert"
+    | "left"
+    | "meta"
+    | "option"
+    | "pagedown"
+    | "pageup"
+    | "right"
+    | "shift"
+    | "space"
+    | "tab"
+    | "up" }?
+
+keycap.function-other.attributes =
+   attribute function { "other" },
+   attribute otherfunction { text }
+
+keycap.function.attrib =
+   (keycap.function-enum.attribute | keycap.function-other.attributes)
+
 db.keycap = element keycap { docbook.text }
 
 db.keycode = element keycode { docbook.text }
 
-ctrl:other-attribute [ name="keycombo"
-                       attribute-name="action"
-                       other-attribute-name="otheraction" ]
+ctrl:other-attribute [ name="keycombo.action.attrib"
+                       enum-name="keycombo.action-enum.attribute"
+                       other-name="keycombo.action-other.attributes" ]
 
 keycombo.action-enum.attribute =
   attribute action {
@@ -1200,12 +1515,12 @@ keycombo.action-enum.attribute =
 
 keycombo.action-other.attributes =
    attribute action { "other" },
-   attribute otheraction { xsd:NMTOKEN }
+   attribute otheraction { text }
 
 keycombo.action.attrib =
    (keycombo.action-enum.attribute | keycombo.action-other.attributes)
 
-db.keycombo = element keycombo { docbook.text }
+db.keycombo = element keycombo { (db.keycap|db.keycombo|db.keysym|db.mousebutton)+ }
 
 db.keysym = element keysym { docbook.text }
 
@@ -1213,17 +1528,23 @@ db.lineannotation = element lineannotation { inlines* }
 
 db.literal = element literal { inlines* }
 
+code.language.attrib = attribute language { text }?
+db.code = element code { inlines* }
+
+constant.class.attrib = attribute class { "limit" }?
 db.constant = element constant { docbook.text }
 
 db.varname = element varname { docbook.text }
 
 db.markup = element markup { docbook.text }
 
-db.menuchoice = element menuchoice { docbook.text }
+db.menuchoice = element menuchoice {
+   db.shortcut?,
+   (db.guibutton|db.guiicon|db.guilabel|db.guimenu|db.guimenuitem|db.guisubmenu)+ }
 
 shortcut.action.attrib = keycombo.action.attrib
 
-db.shortcut = element shortcut { docbook.text }
+db.shortcut = element shortcut {  (db.keycap|db.keycombo|db.keysym|db.mousebutton)+ }
 
 db.mousebutton = element mousebutton { docbook.text }
 
@@ -1234,11 +1555,13 @@ db.optional = element optional { inlines* }
 parameter.class.attrib = attribute class { "command" | "function" | "option" }?
 db.parameter = element parameter { docbook.text }
 
-prompt.inlines = docbook.text
+prompt.inlines = (docbook.text|db.co)
 
 db.prompt = element prompt { prompt.inlines* }
 
-db.replaceable = element replaceable { docbook.text }
+replaceable.class.attrib =
+   attribute class { "command" | "function" | "option" | "parameter" }?
+db.replaceable = element replaceable { (docbook.text|db.co)* }
 
 db.returnvalue = element returnvalue { docbook.text }
 
@@ -1259,11 +1582,13 @@ xmltag.class.attrib =
   }?
 db.xmltag = element xmltag { docbook.text }
 
+symbol.class.attrib = attribute class { "limit" }?
 db.symbol = element symbol { docbook.text }
 
 systemitem.class.attrib =
    attribute class {
-      "domainname"
+      "daemon"
+    | "domainname"
     | "etheraddress"
     | "event"
     | "eventhandler"
@@ -1276,26 +1601,38 @@ systemitem.class.attrib =
     | "netmask"
     | "newsgroup"
     | "osname"
+    | "process"
     | "resource"
+    | "server"
+    | "service"
     | "systemname"
     | "username"
-  }?
+   }?
 
-systemitem.inlines = docbook.text
+systemitem.inlines = (docbook.text|db.co)
 
 db.systemitem = element systemitem { systemitem.inlines* }
 
+uri.type.attrib = attribute type { text }?
 db.uri = element uri { docbook.text }
 
 db.token = element token { docbook.text }
 
 db.type = element type { docbook.text }
 
-db.userinput = element userinput { inlines* }
+db.userinput = element userinput { (inlines|db.co)* }
 
-db.abbrev = element abbrev { docbook.text }
+db.abbrev = element abbrev {
+   (docbook.text
+    | db.superscript
+    | db.subscript
+    | db.trademark)* }
 
-db.acronym = element acronym { docbook.text }
+db.acronym = element acronym {
+   (docbook.text
+    | db.superscript
+    | db.subscript
+    | db.trademark)* }
 
 db.citation = element citation { docbook.text }
 
@@ -1308,15 +1645,23 @@ db.manvolnum = element manvolnum { docbook.text }
 citetitle.pubwork.attrib =
    attribute pubwork {
       "article"
+    | "bbs"
     | "book"
+    | "cdrom"
     | "chapter"
+    | "dvd"
+    | "emailmessage"
+    | "gopher"
     | "journal"
     | "manuscript"
+    | "newsposting"
     | "part"
     | "refentry"
     | "section"
     | "series"
     | "set"
+    | "webpage"
+    | "wiki"
    }?
 
 db.citetitle = element citetitle { inlines* }
@@ -1324,12 +1669,33 @@ db.citetitle = element citetitle { inlines* }
 db.emphasis = element emphasis { inlines* }
 
 firstterm.baseform.attrib = glossterm.baseform.attrib
-db.firstterm = element firstterm { docbook.text }
+db.firstterm =
+   [
+      s:rule [
+         context = "firstterm[@linkend]"
+         s:assert [
+            test = "name(//*[@id=current()/@linkend]) = 'glossentry'"
+            "@linkend on firstterm must point to a glossentry."
+         ]
+      ]
+   ]
+   element firstterm { inlines* }
 
 db.foreignphrase = element foreignphrase { inlines* }
 
 glossterm.baseform.attrib = attribute baseform { text }?
-db.glossterm = element glossterm { docbook.text }
+
+db.glossterm =
+   [
+      s:rule [
+         context = "glossterm[@linkend]"
+         s:assert [
+            test = "name(//*[@id=current()/@linkend]) = 'glossentry'"
+            "@linkend on glossterm must point to a glossentry."
+         ]
+      ]
+   ]
+   element glossterm { inlines* }
 
 db.phrase = element phrase { inlines* }
 
@@ -1346,14 +1712,30 @@ db.trademark = element trademark { docbook.text }
 
 db.wordasword = element wordasword { docbook.text }
 
-db.footnoteref = element footnoteref { empty }
+ctrl:common-linking [ element="footnoteref" suppress="yes" ]
+
+footnoteref.linkend.attrib = linkend.attribute
+footnoteref.label.attrib = attribute label { text }?
+db.footnoteref =
+   [
+      s:rule [
+         context = "footnoteref"
+         s:assert [
+            test = "name(//*[@id=current()/@linkend]) = 'footnote'"
+            "@linkend on footnoteref must point to a footnote."
+         ]
+      ]
+   ]
+   element footnoteref { empty }
 
 ctrl:common-linking [ element="xref" attributes="common.linking.attributes.req" ]
 
-xref.xrefstyle.attrib = attribute xrefstyle { text }
+xref.xrefstyle.attrib = attribute xrefstyle { text }?
+xref.endterm.attrib = attribute endterm { xsd:IDREF }?
 db.xref = element xref { empty }
 
 ctrl:common-linking [ element="anchor" suppress="yes" ]
+ctrl:common-attributes [ element="anchor" attributes="common.attrib.idreq" ]
 
 db.anchor = element anchor { empty }
 
@@ -1377,7 +1759,7 @@ indexterm.singular.class.attrib = attribute class { "singular" }?
 indexterm.startofrange.class.attrib = attribute class { "startofrange" }
 indexterm.endofrange.class.attrib = attribute class { "endofrange" }
 
-indexterm.endofrange.startref.attrib = attribute startref { xsd:IDREF }?
+indexterm.endofrange.startref.attrib = attribute startref { xsd:IDREF }
 
 indexterm.contentmodel =
    db.primary?,
diff --git a/docbook/relaxng/src/refentry.rnc b/docbook/relaxng/src/refentry.rnc
new file mode 100644 (file)
index 0000000..61756d5
--- /dev/null
@@ -0,0 +1,77 @@
+# (Part of) A prototype DocBook V.next RELAX NG grammar.
+
+# This schema is a "work-in-progress". It validates a DocBook-like grammar that
+# may, in some incarnation, form the basis for DocBook V.next. Or it may not.
+# At the moment, it's just an exploration by Norm. It has utterly no normative
+# value at all.
+#
+# Author: Norman Walsh, <ndw@nwalsh.com>
+# Source: Derived from DocBook XML V4.1 and V4.2
+# Release: $Id$
+#
+# ======================================================================
+
+divisions |= db.reference
+
+part.components |= db.refentry | db.reference
+
+article.components.optional |= db.refentry*
+article.components.required |= db.refentry+
+
+reference.status.attrib = status.attribute?
+reference.label.attrib = label.attribute?
+reference.info = docbook.info.titlereq
+db.reference =
+   element reference { reference.info, db.partintro?, db.refentry+ }
+
+refsections.optional = db.refsection* | db.simplesect*
+
+refsections.required = db.refsection+ | db.simplesect*
+
+blocks.or.refsections =
+  (blocks+, refsections.optional) | refsections.required
+
+refentry.status.attrib = status.attribute?
+refentry.label.attrib = label.attribute?
+refentry.info = docbook.info.titleforbidden
+db.refentry =
+   element refentry {
+      db.indexterm*,
+      refentry.info,
+      db.refmeta?,
+      db.refnamediv+,
+      db.refsynopsisdiv?,
+      db.refsection+
+   }
+
+db.refmeta =
+   element refmeta {
+      db.indexterm*,
+      db.refentrytitle,
+      db.manvolnum?,
+      db.refmiscinfo*,
+      db.indexterm*}
+
+refmiscinfo.class.attrib = attribute class { text }
+db.refmiscinfo = element refmiscinfo { docbook.text }
+
+db.refnamediv =
+   element refnamediv { db.refdescriptor?, db.refname+, db.refpurpose, db.refclass* }
+
+db.refdescriptor = element refdescriptor { inlines* }
+
+db.refname = element refname { inlines* }
+
+db.refpurpose = element refpurpose { inlines* }
+
+db.refclass = element refclass { text | db.application* }
+
+refsynopsisdiv.info = docbook.info
+db.refsynopsisdiv =
+   element refsynopsisdiv { refsynopsisdiv.info, blocks.or.refsections }
+
+refsection.status.attrib = status.attribute?
+refsection.label.attrib = label.attribute?
+refsection.info = docbook.info.titlereq
+db.refsection =
+  element refsection { refsection.info, blocks.or.refsections }
diff --git a/docbook/relaxng/src/svg.rnc b/docbook/relaxng/src/svg.rnc
new file mode 100644 (file)
index 0000000..5de872c
--- /dev/null
@@ -0,0 +1,24 @@
+# (Part of) A prototype DocBook V.next RELAX NG grammar.
+
+# This schema is a "work-in-progress". It validates a DocBook-like grammar that
+# may, in some incarnation, form the basis for DocBook V.next. Or it may not.
+# At the moment, it's just an exploration by Norm. It has utterly no normative
+# value at all.
+#
+# Author: Norman Walsh, <ndw@nwalsh.com>
+# Source: Derived from DocBook XML V4.1 and V4.2
+# Release: $Id$
+#
+
+namespace svg = "http://www.w3.org/2000/svg"
+namespace ctrl = "http://nwalsh.com/xmlns/schema-control/"
+
+any.svg =
+   element svg:*
+   {
+      (attribute * { text }
+       | text
+       | any.svg*)*
+   }
+
+imageobject.content |= any.svg
diff --git a/docbook/relaxng/src/tasks.rnc b/docbook/relaxng/src/tasks.rnc
new file mode 100644 (file)
index 0000000..af65d1f
--- /dev/null
@@ -0,0 +1,35 @@
+# (Part of) A prototype DocBook V.next RELAX NG grammar.
+
+# This schema is a "work-in-progress". It validates a DocBook-like grammar that
+# may, in some incarnation, form the basis for DocBook V.next. Or it may not.
+# At the moment, it's just an exploration by Norm. It has utterly no normative
+# value at all.
+#
+# Author: Norman Walsh, <ndw@nwalsh.com>
+# Source: Derived from DocBook XML V4.1 and V4.2
+# Release: $Id$
+#
+# ======================================================================
+
+technical.blocks |= db.task
+
+task.info = docbook.info.titleonly
+
+db.task = element task { task.info,
+                         db.tasksummary?,
+                        db.taskprerequisites?,
+                        db.procedure,
+                        db.example*,
+                        db.taskrelated? }
+
+tasksummary.info = docbook.info.titleonly
+
+db.tasksummary = element tasksummary { tasksummary.info, blocks+ }
+
+taskprerequisites.info = docbook.info.titleonly
+
+db.taskprerequisites = element taskprerequisites { taskprerequisites.info, blocks+ }
+
+taskrelated.info = docbook.info.titleonly
+
+db.taskrelated = element taskrelated { taskrelated.info, blocks+ }