]> granicus.if.org Git - docbook-dsssl/commitdiff
Added XInclude
authorNorman Walsh <ndw@nwalsh.com>
Fri, 1 Jul 2005 19:04:53 +0000 (19:04 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Fri, 1 Jul 2005 19:04:53 +0000 (19:04 +0000)
docbook/relaxng/docbook/src/docbook.rnc
docbook/relaxng/docbook/src/xinclude.rnc [new file with mode: 0644]

index f5f9fffcdcddd9441fff9d0e604117d89d88cdfa..08e9f27152e8723fa9698bc3154bfe203df39528 100644 (file)
@@ -28,6 +28,7 @@ start = db.set
 include "pool.rnc"
 include "annotations.rnc"
 include "xlink.rnc"
+include "xinclude.rnc"
 include "hier.rnc"
 include "sect1.rnc"
 include "refentry.rnc"
diff --git a/docbook/relaxng/docbook/src/xinclude.rnc b/docbook/relaxng/docbook/src/xinclude.rnc
new file mode 100644 (file)
index 0000000..936cbd1
--- /dev/null
@@ -0,0 +1,56 @@
+# This file is part of DocBook NG: The "Lillet" 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 xi = "http://www.w3.org/2001/XInclude"
+namespace db = "http://docbook.org/ns/docbook"
+namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
+
+db.all.blocks |= db.xi.include
+db.all.inlines |= db.xi.include
+
+# ======================================================================
+
+[
+   db:refname [ "xi:include" ]
+   db:refpurpose [ "An XInclude" ]
+]
+div {
+
+   db.xi.include.attlist =
+     attribute href { xsd:anyURI { pattern = "^[#]+" } }?,
+     [ a:defaultValue="xml" ] attribute parse { "xml" | "text" }?,
+     attribute xpointer { text }?,
+     attribute encoding { text }?,
+     attribute accept { text }?,
+     attribute accept-language { text }?
+
+   db.xi.include =
+      element xi:include {
+        db.xi.include.attlist,
+        db.xi.fallback?
+      }
+}
+
+# ======================================================================
+
+[
+   db:refname [ "xi:fallback" ]
+   db:refpurpose [ "An XInclude fallback" ]
+]
+div {
+  # The fallback element has no attributes
+
+  db.xi.fallback =
+      element xi:fallback {
+        db.all.blocks+ | db.all.inlines+ | db._any*
+      }
+}