From b6276de94a46938b60a61a50632e6abf2a953d86 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Wed, 26 May 2004 12:38:26 +0000 Subject: [PATCH] Initial checkins --- docbook/relaxng/tools/doc2dtd.xsl | 286 +++++++++++++ docbook/relaxng/tools/rng2dtd.xsl | 61 +++ docbook/relaxng/tools/rngdocxml2.xsl | 494 +++++++++++++++++++++++ docbook/relaxng/tools/slides-upgrade.xsl | 90 +++++ docbook/relaxng/tools/trimgrammar.xsl | 42 ++ 5 files changed, 973 insertions(+) create mode 100644 docbook/relaxng/tools/doc2dtd.xsl create mode 100644 docbook/relaxng/tools/rng2dtd.xsl create mode 100644 docbook/relaxng/tools/rngdocxml2.xsl create mode 100644 docbook/relaxng/tools/slides-upgrade.xsl create mode 100644 docbook/relaxng/tools/trimgrammar.xsl diff --git a/docbook/relaxng/tools/doc2dtd.xsl b/docbook/relaxng/tools/doc2dtd.xsl new file mode 100644 index 000000000..77c92de4c --- /dev/null +++ b/docbook/relaxng/tools/doc2dtd.xsl @@ -0,0 +1,286 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <!ELEMENT + + + + > + + <!ATTLIST + + + + + xmlns CDATA #FIXED "http://docbook.org/docbook-ng" + version CDATA #IMPLIED + + + + > + + + + + + + + + + + + + ( + + ) + + + + + + ( + + + , + + ) + + + + ( + + + | + + ) + + + + ( + + + , + + ) + + + + ( + + + | + + )* + + + + ( + + + | + + )+ + + + + + ? + + + + + + + + + #PCDATA + + + + EMPTY + + + + Using #PCDATA instead of + #PCDATA + + + + + + + + + + + + + + + + + + + + + + CDATA + + + + + ( + + + | + + ) + + CDATA + + + + + + #IMPLIED + + + #REQUIRED + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docbook/relaxng/tools/rng2dtd.xsl b/docbook/relaxng/tools/rng2dtd.xsl new file mode 100644 index 000000000..c5febef72 --- /dev/null +++ b/docbook/relaxng/tools/rng2dtd.xsl @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + Simplify attributes: + + + + + + + + + + + + + + + + + + + + + + + + + + Simplify choice with text + + + + + + + + + + + + + + + + + + diff --git a/docbook/relaxng/tools/rngdocxml2.xsl b/docbook/relaxng/tools/rngdocxml2.xsl new file mode 100644 index 000000000..627947542 --- /dev/null +++ b/docbook/relaxng/tools/rngdocxml2.xsl @@ -0,0 +1,494 @@ + + + + + + + + + + + + + + + + + + Add groups + + + + + Expand content models + + + + + + + Classify element content + + + + + + + Flatten nested choices + + + + + + + + + + + + Add groups + + + + + Expand content models + + + + + Classify element content + + + + + Flatten nested choices + + + + + Bad pass! + + + + + + + + + + + expand + + + + + + + 0 + + 1 + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + patterns to expand + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + expand + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + classify + + + + + + + + + + + + + + + + + + + + + + + + + + flatten + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + patterns to flatten + + + + + + + + + + + + + + + + + + + + flatten + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docbook/relaxng/tools/slides-upgrade.xsl b/docbook/relaxng/tools/slides-upgrade.xsl new file mode 100644 index 000000000..4e17f4e58 --- /dev/null +++ b/docbook/relaxng/tools/slides-upgrade.xsl @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + Check + + title. + + + + + + + + + + + + + Check + + : no title. + + + + + + + + + Check + + titleabbrev. + + + + + + + + + + + + + + + + + Check + + subtitle. + + + + + + + + + + + + + + + + + + + + + diff --git a/docbook/relaxng/tools/trimgrammar.xsl b/docbook/relaxng/tools/trimgrammar.xsl new file mode 100644 index 000000000..fc4875abe --- /dev/null +++ b/docbook/relaxng/tools/trimgrammar.xsl @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.40.0