--- /dev/null
+# This file is part of DocBook NG: The "IPA" Release.
+
+# 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.3
+# Release: $Id$
+#
+
+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"
+namespace db = "http://docbook.org/docbook-ng"
+default namespace = "http://docbook.org/docbook-ng"
+
+# TEI: formula
+
+db.math.inlines = db.inlineequation
+
+db.math.blocks =
+ db.equation
+ | db.informalequation
+
+db.domain.inlines |= db.math.inlines
+
+db.nopara.blocks |= db.math.blocks
+
+# ======================================================================
+
+db.equation.content = (db.mediaobject+ | db.mathphrase+)
+
+# ======================================================================
+
+[
+ db:refname [ "equation" ]
+ db:refpurpose [ "A displayed mathematical equation" ]
+]
+div {
+
+ db.equation.role.attribute = attribute role { text }
+
+ db.equation.attlist =
+ db.equation.role.attribute?
+ & db.common.attributes
+ & db.common.linking.attributes
+ & attribute label { text }?
+ & db.pgwide.attribute?
+ & db.floatstyle.attribute?
+ & db.float.attribute?
+
+ db.equation.info = db._info.title.onlyreq
+
+ db.equation =
+ element equation {
+ db.equation.attlist,
+ db.equation.info,
+ db.equation.content
+ }
+}
+
+# ======================================================================
+
+[
+ db:refname [ "informalequation" ]
+ db:refpurpose [ "A displayed mathematical equation without a title" ]
+]
+div {
+
+ db.informalequation.role.attribute = attribute role { text }
+
+ db.informalequation.attlist =
+ db.informalequation.role.attribute?
+ & db.common.attributes
+ & db.common.linking.attributes
+
+ db.informalequation.info = db._info.title.forbidden
+
+ db.informalequation =
+ element informalequation {
+ db.informalequation.attlist,
+ db.informalequation.info,
+ db.equation.content
+ }
+}
+
+# ======================================================================
+
+[
+ db:refname [ "inlineequation" ]
+ db:refpurpose [ "A mathematical equation or expression occurring inline" ]
+]
+div {
+
+ db.inlineequation.role.attribute = attribute role { text }
+
+ db.inlineequation.attlist =
+ db.inlineequation.role.attribute?
+ & db.common.attributes
+ & db.common.linking.attributes
+
+ db.inlineequation =
+ element inlineequation {
+ db.inlineequation.attlist,
+ db.equation.content
+ }
+}
+
+# ======================================================================
+
+[
+ db:refname [ "mathphrase" ]
+ db:refpurpose [ "A mathematical phrase, an expression that can be represented with ordinary text and a small amount of markup" ]
+]
+div {
+
+ db.mathphrase.role.attribute = attribute role { text }
+
+ db.mathphrase.attlist =
+ db.mathphrase.role.attribute?
+ & db.common.attributes
+ & db.common.linking.attributes
+
+ db.mathphrase =
+ element mathphrase {
+ db.mathphrase.attlist,
+ (db._text | db.ubiq.inlines | db._emphasis)*
+ }
+}
+
db._text
}
+db._emphasis =
+ element emphasis {
+ db.emphasis.attlist,
+ (db._text | db._emphasis)*
+ }
+
db._title = db.title? & db.titleabbrev? & db.subtitle?
db._title.req = db.title & db.titleabbrev? & db.subtitle?
db._title.only = db.title? & db.titleabbrev?
| db.os.inlines
| db.programming.inlines
| db.markup.inlines
- | db.math.inlines
| db.gui.inlines
| db.keyboard.inlines
| db.optional
| db.package
| db.property
+ | db.termdef
db.error.inlines =
db.errorcode
| db.superscript
| db.wordasword
-# TEI: formula
-
-db.math.inlines = db.inlineequation
-
# TEI: figure
db.graphic.inlines = db.inlinemediaobject
db.list.blocks
| db.admonition.blocks
| db.formal.blocks
- | db.equation.blocks
| db.informal.blocks
| db.publishing.blocks
| db.graphic.blocks
| db.figure
| db.table
-db.equation.blocks =
- db.equation
- | db.informalequation
-
db.informal.blocks =
db.informalexample
| db.informalfigure
# ======================================================================
+[
+ db:refname [ "termdef" ]
+ db:refpurpose [ "An inline definition of a term" ]
+]
+div {
+
+ db.termdef.role.attribute = attribute role { text }
+
+ db.termdef.attlist =
+ db.termdef.role.attribute?
+ & db.common.attributes
+ & db.common.linking.attributes
+
+ db.termdef =
+ element termdef {
+ db.termdef.attlist,
+ (db.all.inlines* & db.glossterm)
+ }
+}
+
+# ======================================================================
+
[
db:refname [ "example" ]
db:refpurpose [ "A formal example, with a title" ]
# ======================================================================
-db.equation.content = db.mediaobject
-
-# ======================================================================
-
-[
- db:refname [ "equation" ]
- db:refpurpose [ "A displayed mathematical equation" ]
-]
-div {
-
- db.equation.role.attribute = attribute role { text }
-
- db.equation.attlist =
- db.equation.role.attribute?
- & db.common.attributes
- & db.common.linking.attributes
- & attribute label { text }?
- & db.pgwide.attribute?
- & db.floatstyle.attribute?
- & db.float.attribute?
-
- db.equation.info = db._info.title.onlyreq
-
- db.equation =
- element equation {
- db.equation.attlist,
- db.equation.info,
- db.equation.content+
- }
-}
-
-# ======================================================================
-
-[
- db:refname [ "informalequation" ]
- db:refpurpose [ "A displayed mathematical equation without a title" ]
-]
-div {
-
- db.informalequation.role.attribute = attribute role { text }
-
- db.informalequation.attlist =
- db.informalequation.role.attribute?
- & db.common.attributes
- & db.common.linking.attributes
-
- db.informalequation.info = db._info.title.forbidden
-
- db.informalequation =
- element informalequation {
- db.informalequation.attlist,
- db.informalequation.info,
- db.equation.content+
- }
-}
-
-# ======================================================================
-
-[
- db:refname [ "inlineequation" ]
- db:refpurpose [ "A mathematical equation or expression occurring inline" ]
-]
-div {
-
- db.inlineequation.role.attribute = attribute role { text }
-
- db.inlineequation.attlist =
- db.inlineequation.role.attribute?
- & db.common.attributes
- & db.common.linking.attributes
-
- db.inlineequation =
- element inlineequation {
- db.inlineequation.attlist,
- db.equation.content+
- }
-}
-
-# ======================================================================
-
[
db:refname [ "synopsis" ]
db:refpurpose [ "A general-purpose element for representing the syntax of commands or functions" ]
[
db:refname [ "superscript" ]
- db:refpurpose [ "A superscript (as in x2, the mathematical notation for x multiplied by itself)" ]
+ db:refpurpose [ "A superscript (as in x^2, the mathematical notation for x multiplied by itself)" ]
]
div {