# (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"
# ======================================================================
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 }
remap.attribute?,
xreflabel.attribute?,
revisionflag.attribute?,
- effectivity.attributes?
+ effectivity.attributes
common.attrib.idreq =
id.attribute,
remap.attribute?,
xreflabel.attribute?,
revisionflag.attribute?,
- effectivity.attributes?
+ effectivity.attributes
common.linking.attributes.req =
linkend.attribute | href.attribute
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"
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
oo.inlines = db.ooclass | db.ooexception | db.oointerface
+# TEI: code, programlisting (x.data)
+
programming.inlines =
db.function
| db.parameter
| db.initializer
| oo.inlines
+# TEI: names
+
product.inlines =
db.productnumber
| db.productname
| db.hardware
| db.trademark
+# TEI: x.data
+
os.inlines =
db.prompt
| db.envar
| 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
| 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
| 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
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
| db.indexterm
| db.bridgehead
| db.remark
+ | db.revhistory
+
+blocks =
+ blocks.nopara
+ | para.blocks
+ | extension.blocks
formal.blocks =
db.equation
| db.procedure
| db.simplelist
| db.variablelist
+ | db.qandaset
+ | db.glosslist
+ | db.segmentedlist
verbatim.blocks =
db.programlisting
| db.destructorsynopsis
| db.fieldsynopsis
+extension.blocks = notAllowed
+
# ======================================================================
db.title = element title { 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
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+ }
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* }
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 {
(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 }
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 =
db.glossterm,
db.acronym?,
db.abbrev?,
+ db.indexterm*,
(db.glosssee | db.glossdef+)
}
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+ }
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
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 =
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,
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*
}
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 {
}
-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)* }
db.varargs = element varargs { empty }
+paramdef.choice.attrib = attribute choice { "opt" | "req" }?
+
db.paramdef =
element paramdef { (docbook.text | db.type | db.parameter | db.funcparams)* }
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+,
| 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 }
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
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
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 {
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
| db.country
| db.phone
| db.fax
- | db.email)*
+ | db.email
+ | db.otheraddr)*
}
db.street = element street { 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* }
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 =
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* }
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"
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 }
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 =
db.revnumber = element revnumber { docbook.text }
-db.revremark = element revremark { inlines* }
+db.revremark = element revremark { docbook.text }
db.revdescription = element revdescription { blocks* }
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" }?
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 }
db.errorname = element errorname { docbook.text }
-db.errortext = element errortext { inlines* }
+db.errortext = element errortext { docbook.text }
db.errortype = element errortype { 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 {
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 }
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 }
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 }
}?
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"
| "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 }
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* }
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* }
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 }
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?,