From 16457c355d0513acf9bb5c78410148690cbae674 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Wed, 5 Jan 2005 12:34:26 +0000 Subject: [PATCH] Added alt and annotation --- docbook/relaxng/src/annotations.rnc | 64 +++++++++++++++++++++++++++++ docbook/relaxng/src/docbook.rnc | 3 +- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 docbook/relaxng/src/annotations.rnc diff --git a/docbook/relaxng/src/annotations.rnc b/docbook/relaxng/src/annotations.rnc new file mode 100644 index 000000000..8f3c9f5e1 --- /dev/null +++ b/docbook/relaxng/src/annotations.rnc @@ -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, +# 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+ + } +} + diff --git a/docbook/relaxng/src/docbook.rnc b/docbook/relaxng/src/docbook.rnc index de252cd33..cf46f7535 100644 --- a/docbook/relaxng/src/docbook.rnc +++ b/docbook/relaxng/src/docbook.rnc @@ -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" -- 2.40.0