]> granicus.if.org Git - docbook-dsssl/commitdiff
Added alt and annotation
authorNorman Walsh <ndw@nwalsh.com>
Wed, 5 Jan 2005 12:34:26 +0000 (12:34 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Wed, 5 Jan 2005 12:34:26 +0000 (12:34 +0000)
docbook/relaxng/src/annotations.rnc [new file with mode: 0644]
docbook/relaxng/src/docbook.rnc

diff --git a/docbook/relaxng/src/annotations.rnc b/docbook/relaxng/src/annotations.rnc
new file mode 100644 (file)
index 0000000..8f3c9f5
--- /dev/null
@@ -0,0 +1,64 @@
+# This file is part of DocBook NG: The "Gin" 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 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"
+
+db.ubiq.inlines |= db.alt | db.annotation
+
+# ======================================================================
+
+[
+   db:refname [ "alt" ]
+   db:refpurpose [ "A text-only annotation, often used for accessibility" ]
+]
+div {
+
+   db.alt.role.attribute = attribute role { text }
+
+   db.alt.attlist =
+      db.alt.role.attribute?
+    & db.common.attributes
+
+   db.alt = element alt {
+      db.alt.attlist,
+      (text | db.inlinemediaobject)*
+   }
+}
+
+# ======================================================================
+
+[
+   db:refname [ "annotation" ]
+   db:refpurpose [ "An annotation" ]
+]
+div {
+
+   db.annotation.role.attribute = attribute role { text }
+
+   db.annotation.attlist =
+      db.annotation.role.attribute?
+    & db.common.attributes
+
+   db.annotation.info = db._info.title.only
+
+   db.annotation =
+      element annotation {
+         db.annotation.attlist,
+         db.annotation.info,
+         db.all.blocks+
+      }
+}
+
index de252cd33be8df169478068808d0cd7873df32c4..cf46f7535436106556f3d1f4a87765548c941a26 100644 (file)
@@ -25,12 +25,13 @@ start = db.set
        | db.section
        | db.para
 
+include "pool.rnc"
+include "annotations.rnc"
 include "xlink.rnc"
 include "hier.rnc"
 include "sect1.rnc"
 include "refentry.rnc"
 include "refsect1.rnc"
-include "pool.rnc"
 include "glossary.rnc"
 include "bibliography.rnc"
 include "index.rnc"