]> granicus.if.org Git - docbook-dsssl/commitdiff
Allow svg:* and mml:* in imagedata. Removed svg:* as an /alternative/ to imagedata...
authorNorman Walsh <ndw@nwalsh.com>
Fri, 2 Jun 2006 13:58:45 +0000 (13:58 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Fri, 2 Jun 2006 13:58:45 +0000 (13:58 +0000)
docbook/relaxng/docbook/src/mathml.rnc
docbook/relaxng/docbook/src/pool.rnc
docbook/relaxng/docbook/src/svg.rnc

index 83f54bb05628bcde87ee751ffd40737710f6b2dc..f61a6db3db99452ea354fbc64d561787df9841bf 100644 (file)
@@ -36,6 +36,34 @@ default namespace = "http://docbook.org/ns/docbook"
 
 db.equation.content |= db._any.mml+
 
+# Allow imagedata to contain MathML
+
+db.imagedata.mathml.role.attribute = attribute role { text }
+
+db.imagedata.mathml.attlist =
+      db.imagedata.mathml.role.attribute?
+    & db.common.attributes
+    & attribute format { "mathml" }?
+    & db.imagedata.align.attribute?
+    & db.imagedata.valign.attribute?
+    & db.imagedata.width.attribute?
+    & db.imagedata.contentwidth.attribute?
+    & db.imagedata.scalefit.attribute?
+    & db.imagedata.scale.attribute?
+    & db.imagedata.depth.attribute?
+    & db.imagedata.contentdepth.attribute?
+
+db.imagedata.mathml.info = db._info.title.forbidden
+
+db.imagedata.mathml =
+   element imagedata {
+      db.imagedata.attlist,
+      db.imagedata.info,
+      db._any.mml+
+   }
+
+db.imageobject.content |= db.imagedata.mathml
+
 [
    db:refname [ "mml:*" ]
    db:refpurpose [ "Any element from the MathML namespace" ]
index 6e645cd6bcd10fa3a16afd309595144e4959e40b..45595d19f079e3750ca175367c857f7f2aab5a58 100644 (file)
@@ -2695,7 +2695,8 @@ div {
    db.imagedata =
       element imagedata {
          db.imagedata.attlist,
-         db.imagedata.info
+         db.imagedata.info,
+         empty
       }
 }
 
index 915880789e8a868973224338e0b3d4f266c6bb3e..50835d522d139cecbe540eb12ff181e54b75b10f 100644 (file)
@@ -34,7 +34,33 @@ namespace s = "http://www.ascc.net/xml/schematron"
 namespace db = "http://docbook.org/ns/docbook"
 default namespace = "http://docbook.org/ns/docbook"
 
-db.imageobject.content |= db._any.svg+
+db.imageobject.content |= db.imagedata.svg
+
+# Allow imagedata to contain SVG
+
+db.imagedata.svg.role.attribute = attribute role { text }
+
+db.imagedata.svg.attlist =
+      db.imagedata.svg.role.attribute?
+    & db.common.attributes
+    & attribute format { "svg" }?
+    & db.imagedata.align.attribute?
+    & db.imagedata.valign.attribute?
+    & db.imagedata.width.attribute?
+    & db.imagedata.contentwidth.attribute?
+    & db.imagedata.scalefit.attribute?
+    & db.imagedata.scale.attribute?
+    & db.imagedata.depth.attribute?
+    & db.imagedata.contentdepth.attribute?
+
+db.imagedata.svg.info = db._info.title.forbidden
+
+db.imagedata.svg =
+   element imagedata {
+      db.imagedata.attlist,
+      db.imagedata.info,
+      db._any.svg+
+   }
 
 [
    db:refname [ "svg:*" ]