[gnome-doc-utils] [rng/mallard] Adding static Mallard RNG, removing spec



commit f0e17c927b8fed272c1830d3f8ea7b7095bbf467
Author: Shaun McCance <shaunm gnome org>
Date:   Sun Feb 21 15:35:31 2010 -0600

    [rng/mallard] Adding static Mallard RNG, removing spec
    
    The spec and schemas are now hosted on projectmallard.org.  We need to
    figure out a long-term solution for distributing the schema, but for
    now we'll just ship static copies in gnome-doc-utils.

 configure.in            |    1 -
 doc/Makefile.am         |    2 +-
 rng/mallard/.gitignore  |    2 -
 rng/mallard/Makefile.am |   34 +-
 rng/mallard/mallard.rnc |  571 +++++++++++++++++
 rng/mallard/mallard.rng | 1599 +++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 2172 insertions(+), 37 deletions(-)
---
diff --git a/configure.in b/configure.in
index 6dec0fd..f0538bc 100644
--- a/configure.in
+++ b/configure.in
@@ -57,7 +57,6 @@ data/templates/Makefile
 data/watermarks/Makefile
 doc/Makefile
 doc/gnome-doc-make/Makefile
-doc/mallard/Makefile
 doc/xslt/Makefile
 po/Makefile.in
 rng/Makefile
diff --git a/doc/Makefile.am b/doc/Makefile.am
index b95586d..b497cb3 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1 +1 @@
-SUBDIRS = gnome-doc-make xslt mallard
+SUBDIRS = gnome-doc-make xslt
diff --git a/rng/mallard/Makefile.am b/rng/mallard/Makefile.am
index 8082080..417251a 100644
--- a/rng/mallard/Makefile.am
+++ b/rng/mallard/Makefile.am
@@ -1,36 +1,4 @@
-AUTOMAKE_OPTIONS = -Wno-portability
-
-all: mallard.rnc mallard.rng
-
-_specs1=$(top_srcdir)/doc/mallard/C/mal_page.page   \
-        $(top_srcdir)/doc/mallard/C/mal_block.page  $(wildcard $(top_srcdir)/doc/mallard/C/mal_block_*.page) \
-        $(top_srcdir)/doc/mallard/C/mal_inline.page $(wildcard $(top_srcdir)/doc/mallard/C/mal_inline_*.page)
-_specs=$(_specs1) $(filter-out $(_specs1), $(wildcard $(top_srcdir)/doc/mallard/C/*.page))
-
-mallard.rnc: $(wildcard $(top_srcdir)/doc/mallard/C/*.page)
-	for file in $(_specs); do \
-	  xsltproc $(srcdir)/mal2rnc.xsl $$file; \
-	done > mallard.rnc
-
-# http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=1236105
-# This bug in gawk on solaris causes rnc2rng to fail it mysterious and
-# spectacular ways.  See comment #13 here for more details:
-# http://bugzilla.gnome.org/show_bug.cgi?id=590694
-# Unsetting LANG for the awk call works around this.
-mallard.rng: mallard.rnc rnc2rng.awk
-	LANG= $(GDU_AWK) -f $(srcdir)/rnc2rng.awk mallard.rnc > $  tmp || ( rm -f $  tmp && exit 1 )
-	xmllint --format $  tmp | \
-	  sed -e 's/^  //' \
-	      -e 's/ xmlns/\n    xmlns/g' \
-	      -e 's/" ns=/"\n    ns=/' \
-	      -e 's/^<s/\n<s/' \
-	      -e 's/^<d/\n<d/' \
-	  > $@ || ( rm -f $  tmp && exit 1 ) && rm -f $  tmp
-
 specdir = $(datadir)/xml/mallard/1.0/
 spec_DATA = mallard.rnc mallard.rng
 
-EXTRA_DIST = mal2rnc.xsl rnc2rng.awk
-
-CLEANFILES = $(spec_DATA)
-DISTCLEANFILES = $(spec_DATA)
+EXTRA_DIST = $(spec_DATA)
diff --git a/rng/mallard/mallard.rnc b/rng/mallard/mallard.rnc
new file mode 100644
index 0000000..63e5455
--- /dev/null
+++ b/rng/mallard/mallard.rnc
@@ -0,0 +1,571 @@
+
+namespace local = ""
+default namespace mal = "http://projectmallard.org/1.0/";
+start = mal_page
+mal_page = element page {
+  attribute id { xsd:NMTOKEN },
+  attribute type { "guide" | "topic" } ?,
+  attribute style { xsd:NMTOKENS } ?,
+  attribute groups { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_info ?,
+  mal_block_title,
+  mal_block *,
+  mal_section *
+}
+
+mal_section = element section {
+  attribute id { xsd:ID },
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_info ?,
+  mal_block_title,
+  mal_block *,
+  mal_section *
+}
+
+mal_info = element info {
+  mal_attr_external *,
+
+  ( mal_info_desc ? &
+    mal_info_credit * &
+    mal_info_license * &
+    mal_info_link * &
+    mal_info_title * &
+    mal_info_revision * &
+    mal_external *
+  )
+}
+
+mal_info_credit = element credit {
+  attribute type { xsd:NMTOKENS } ?,
+  attribute * - (mal:* | local:*) { text } *,
+
+  ( mal_info_name &
+    mal_info_email ? &
+    mal_info_years ? &
+    mal_external *
+  )
+}
+
+mal_info_link = element link {
+  attribute type { xsd:NMTOKEN },
+  ( attribute xref { text } |
+    attribute href { text }
+  ),
+  attribute group { text } ?
+  attribute * - (mal:* | local:*) { text } *,
+
+  mal_external *
+}
+
+mal_info_title = element title {
+  attribute type { xsd:NMTOKEN },
+  attribute role { xsd:NMTOKEN } ?,
+  attribute * - (mal:* | local:*) { text } *,
+
+  mal_inline
+}
+
+mal_info_license = element license {
+  attribute href { text } ?,
+  attribute * - (mal:* | local:*) { text } *,
+
+  mal_block +
+}
+
+mal_info_desc = element desc {
+  attribute * - (mal:* | local:*) { text } *,
+
+  mal_inline
+}
+
+mal_info_revision = element revision {
+  attribute version { text } ?,
+  attribute docversion { text } ?,
+  attribute pkgversion { text } ?,
+  attribute date { xsd:date } ?,
+  attribute status {
+    "stub"   | "incomplete" | "draft" | "outdated" |
+    "review" | "candidate"  | "final" } ?,
+  attribute * - (mal:* | local:*) { text } *,
+
+  mal_block_title ?,
+  mal_block_desc ?,
+  mal_external *
+}
+
+mal_info_years = element years {
+  attribute * - (mal:* | local:*) { text } *,
+  mal_inline
+}
+
+mal_info_email = element email {
+  attribute * - (mal:* | local:*) { text } *,
+  mal_inline
+}
+
+mal_info_name = element name {
+  attribute * - (mal:* | local:*) { text } *,
+  mal_inline
+}
+
+mal_block = (
+  mal_block_basic |
+  mal_block_formal |
+  mal_block_lists |
+  mal_table
+)
+
+mal_block_basic = (
+  mal_block_code |
+  mal_block_example |
+  mal_block_media |
+  mal_block_p |
+  mal_block_screen
+)
+mal_block_formal = (
+  mal_block_comment |
+  mal_block_figure |
+  mal_block_listing |
+  mal_block_note |
+  mal_block_quote |
+  mal_block_synopsis
+)
+mal_block_lists = (
+  mal_block_list |
+  mal_block_steps |
+  mal_block_terms |
+  mal_block_tree
+)
+mal_block_code = element code {
+  attribute style { xsd:NMTOKENS } ?,
+  attribute mime { text } ?,
+  mal_attr_external *,
+
+  mal_inline
+}
+
+mal_block_example = element example {
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_block +
+}
+
+mal_block_media = element media {
+  attribute type { "image" | "video" | "audio" | "application" } ?,
+  attribute mime { text } ?,
+  attribute src { text },
+  attribute height { text } ?,
+  attribute width { text } ?,
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_block *
+}
+
+mal_block_p = element p {
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_inline
+}
+
+mal_block_screen = element screen {
+  attribute style { xsd:NMTOKENS } ?,
+  attribute mime { text } ?,
+  mal_attr_external *,
+
+  mal_inline
+}
+
+mal_block_quote = element quote {
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_block_title ?,
+  mal_block_cite,
+  mal_block +
+}
+
+mal_block_comment = element comment {
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_block_title ?,
+  mal_block_cite,
+  mal_block +
+}
+
+mal_block_figure = element figure {
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_block_title ?,
+  mal_block_desc ?,
+  mal_block +
+}
+
+mal_block_listing = element listing {
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_block_title ?,
+  mal_block_desc ?,
+  mal_block +
+}
+
+mal_block_note = element note {
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_block_title ?,
+  mal_block +
+}
+
+mal_block_synopsis = element synopsis {
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_block_title ?,
+  mal_block_desc ?,
+  mal_block +
+}
+
+mal_block_list = element list {
+  attribute type { xsd:NMTOKEN } ?,
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_block_title ?,
+  mal_block_list_item +
+}
+mal_block_list_item = element item {
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_block +
+}
+
+mal_block_terms = element terms {
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_block_title ?,
+  mal_block_terms_item +
+}
+mal_block_terms_item = element item {
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_block_title +,
+  mal_block +
+}
+
+mal_block_steps = element steps {
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_block_title ?,
+  mal_block_steps_item +
+}
+mal_block_steps_item = element item {
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_block +
+}
+
+mal_block_tree = element tree {
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_block_title ?,
+  mal_block_tree_item +
+}
+mal_block_tree_item = element item {
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_inline,
+  mal_block_tree_item *
+}
+
+mal_table_col = element col {
+  attribute style { xsd:NMTOKENS } ?,
+  attribute * - (mal:* | local:*) { text } *
+}
+mal_table_colgroup = element colgroup {
+  attribute style { xsd:NMTOKENS } ?,
+  attribute * - (mal:* | local:*) { text } *,
+
+  mal_table_col *
+}
+
+mal_table_tr = element tr {
+  attribute style { xsd:NMTOKENS } ?,
+  attribute * - (mal:* | local:*) { text } *,
+
+  mal_table_td *
+}
+mal_table_thead = element thead {
+  attribute style { xsd:NMTOKENS } ?,
+  attribute * - (mal:* | local:*) { text } *,
+
+  mal_table_tr +
+}
+mal_table_tbody = element tbody {
+  attribute style { xsd:NMTOKENS } ?,
+  attribute * - (mal:* | local:*) { text } *,
+
+  mal_table_tr +
+}
+mal_table_tfoot = element tfoot {
+  attribute style { xsd:NMTOKENS } ?,
+  attribute * - (mal:* | local:*) { text } *,
+
+  mal_table_tr +
+}
+
+mal_table_td = element td {
+  attribute style { xsd:NMTOKENS } ?,
+  attribute * - (mal:* | local:*) { text } *,
+  attribute rowspan { text } ?,
+  attribute colspan { text } ?,
+
+  mal_block +
+}
+
+mal_table = element table {
+  attribute style { xsd:NMTOKENS } ?,
+  attribute * - (mal:* | local:*) { text } *,
+  attribute frame {
+    "all" | "none" |
+    list { ("top" | "bottom" | "left" | "right") * }
+  } ?,
+  attribute rules {
+    "all" | "groups" | "none" |
+    list { ("rows" | "rowgroups" | "cols" | "colgroups") * }
+  } ?,
+  attribute shade {
+    "all" | "groups" | "none" |
+    list { ("rows" | "rowgroups" | "cols" | "colgroups") * }
+  } ?,
+
+  mal_block_title ?,
+  mal_block_desc ?,
+
+  ( mal_table_col + |
+    mal_table_colgroup +
+  ) ?,
+
+  ( mal_table_tr + |
+    ( mal_table_thead ?,
+      mal_table_tbody +,
+      mal_table_tfoot ?
+    )
+  )
+}
+
+mal_block_desc = element desc {
+  attribute style { xsd:NMTOKENS } ?,
+  attribute * - (mal:* | local:*) { text } *,
+
+  mal_inline
+}
+
+mal_block_cite = element cite {
+  attribute style { xsd:NMTOKENS } ?,
+  attribute * - (mal:* | local:*) { text } *,
+  attribute date { text } ?,
+  attribute href { text } ?,
+
+  mal_inline
+}
+
+mal_block_subtitle = element subtitle {
+  mal_inline
+}
+
+mal_block_title = element title {
+  mal_inline
+}
+
+mal_inline = {
+  mal_inline_app * &
+  mal_inline_cmd * &
+  mal_inline_code * &
+  mal_inline_em * &
+  mal_inline_file * &
+  mal_inline_gui * &
+  mal_inline_guiseq * &
+  mal_inline_input * &
+  mal_inline_key * &
+  mal_inline_keyseq * &
+  mal_inline_link * &
+  mal_inline_media * &
+  mal_inline_output * &
+  mal_inline_span * &
+  mal_inline_sys * &
+  mal_inline_var * &
+  element * - (mal:* | local:*) { mal_inline } * &
+  text ?
+}
+
+mal_inline_app = element app {
+  mal_attr_link ?,
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_inline
+}
+
+mal_inline_code = element code {
+  mal_attr_link ?,
+  attribute style { xsd:NMTOKENS } ?,
+  attribute mime { text } ?,
+  mal_attr_external *,
+
+  mal_inline
+}
+
+mal_inline_cmd = element cmd {
+  mal_attr_link ?,
+  attribute style { xsd:NMTOKENS } ?,
+  attribute mime { text } ?,
+  mal_attr_external *,
+
+  mal_inline
+}
+
+mal_inline_output = element output {
+  mal_attr_link ?,
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_inline
+}
+
+mal_inline_em = element em {
+  mal_attr_link ?,
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_inline
+}
+
+mal_inline_file = element file {
+  mal_attr_link ?,
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_inline
+}
+
+mal_inline_gui = element gui {
+  mal_attr_link ?,
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_inline
+}
+
+mal_inline_guiseq = element guiseq {
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mixed { mal_inline_gui + }
+}
+
+mal_inline_link = element link {
+  ( attribute xref { text } |
+    attribute href { text } |
+    ( attribute xref { text }, attribute href { text } )
+  ),
+  attribute role { text } ?,
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_inline
+}
+
+mal_inline_media = element media {
+  mal_attr_link ?,
+  attribute style { xsd:NMTOKENS } ?,
+  attribute type { "image" | "video" | "audio" | "application" } ?,
+  attribute mime { text } ?,
+  attribute src { text },
+  attribute height { text } ?,
+  attribute width { text } ?,
+  mal_attr_external *,
+
+  mal_inline
+}
+
+mal_inline_keyseq = element keyseq {
+  attribute style { xsd:NMTOKENS } ?,
+  attribute type { "combo" | "sequence" } ?,
+  mal_attr_external *,
+
+  mixed {
+    (mal_inline_key | mal_inline_keyseq) *
+  }
+}
+
+mal_inline_key = element key {
+  mal_attr_link ?,
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_inline
+}
+
+mal_inline_span = element span {
+  mal_attr_link ?,
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_inline
+}
+
+mal_inline_sys = element sys {
+  mal_attr_link ?,
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_inline
+}
+
+mal_inline_input = element input {
+  mal_attr_link ?,
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_inline
+}
+
+mal_inline_var = element var {
+  mal_attr_link ?,
+  attribute style { xsd:NMTOKENS } ?,
+  mal_attr_external *,
+
+  mal_inline
+}
+
+mal_external = element * - (mal:* | local:*) {
+  attribute * { text } *,
+  mal_anything *
+}
+mal_anything = element * {
+  attribute * { text } *,
+  mal_anything *
+}
+mal_attr_external = attribute * - (mal:* | local:*) { text }
+
+mal_attr_link =
+  ( attribute xref { text } ?
+  | { attribute dref { text } ?, attribute href { text } ? }
+  )
diff --git a/rng/mallard/mallard.rng b/rng/mallard/mallard.rng
new file mode 100644
index 0000000..b82f835
--- /dev/null
+++ b/rng/mallard/mallard.rng
@@ -0,0 +1,1599 @@
+<?xml version="1.0"?>
+<grammar
+    xmlns="http://relaxng.org/ns/structure/1.0";
+    xmlns:mal="http://projectmallard.org/1.0/";
+    ns="http://projectmallard.org/1.0/";>
+
+<start>
+  <ref name="mal_page"/>
+</start>
+
+<define name="mal_page">
+  <element name="page">
+    <attribute name="id">
+      <data type="NMTOKEN" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+    </attribute>
+    <optional>
+      <attribute name="type">
+        <choice>
+          <value>guide</value>
+          <value>topic</value>
+        </choice>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="groups">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <optional>
+      <ref name="mal_info"/>
+    </optional>
+    <ref name="mal_block_title"/>
+    <zeroOrMore>
+      <ref name="mal_block"/>
+    </zeroOrMore>
+    <zeroOrMore>
+      <ref name="mal_section"/>
+    </zeroOrMore>
+  </element>
+</define>
+
+<define name="mal_section">
+  <element name="section">
+    <attribute name="id">
+      <data type="ID" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+    </attribute>
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <optional>
+      <ref name="mal_info"/>
+    </optional>
+    <ref name="mal_block_title"/>
+    <zeroOrMore>
+      <ref name="mal_block"/>
+    </zeroOrMore>
+    <zeroOrMore>
+      <ref name="mal_section"/>
+    </zeroOrMore>
+  </element>
+</define>
+
+<define name="mal_info">
+  <element name="info">
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <interleave>
+      <optional>
+        <ref name="mal_info_desc"/>
+      </optional>
+      <zeroOrMore>
+        <ref name="mal_info_credit"/>
+      </zeroOrMore>
+      <zeroOrMore>
+        <ref name="mal_info_license"/>
+      </zeroOrMore>
+      <zeroOrMore>
+        <ref name="mal_info_link"/>
+      </zeroOrMore>
+      <zeroOrMore>
+        <ref name="mal_info_title"/>
+      </zeroOrMore>
+      <zeroOrMore>
+        <ref name="mal_info_revision"/>
+      </zeroOrMore>
+      <zeroOrMore>
+        <ref name="mal_external"/>
+      </zeroOrMore>
+    </interleave>
+  </element>
+</define>
+
+<define name="mal_info_credit">
+  <element name="credit">
+    <optional>
+      <attribute name="type">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <attribute>
+        <anyName>
+          <except>
+            <nsName ns="http://projectmallard.org/1.0/"/>
+            <nsName ns=""/>
+          </except>
+        </anyName>
+        <text/>
+      </attribute>
+    </zeroOrMore>
+    <interleave>
+      <ref name="mal_info_name"/>
+      <optional>
+        <ref name="mal_info_email"/>
+      </optional>
+      <optional>
+        <ref name="mal_info_years"/>
+      </optional>
+      <zeroOrMore>
+        <ref name="mal_external"/>
+      </zeroOrMore>
+    </interleave>
+  </element>
+</define>
+
+<define name="mal_info_link">
+  <element name="link">
+    <attribute name="type">
+      <data type="NMTOKEN" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+    </attribute>
+    <choice>
+      <attribute name="xref">
+        <text/>
+      </attribute>
+      <attribute name="href">
+        <text/>
+      </attribute>
+    </choice>
+    <optional>
+      <attribute name="group">
+        <text/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <attribute>
+        <anyName>
+          <except>
+            <nsName ns="http://projectmallard.org/1.0/"/>
+            <nsName ns=""/>
+          </except>
+        </anyName>
+        <text/>
+      </attribute>
+    </zeroOrMore>
+    <zeroOrMore>
+      <ref name="mal_external"/>
+    </zeroOrMore>
+  </element>
+</define>
+
+<define name="mal_info_title">
+  <element name="title">
+    <attribute name="type">
+      <data type="NMTOKEN" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+    </attribute>
+    <optional>
+      <attribute name="role">
+        <data type="NMTOKEN" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <attribute>
+        <anyName>
+          <except>
+            <nsName ns="http://projectmallard.org/1.0/"/>
+            <nsName ns=""/>
+          </except>
+        </anyName>
+        <text/>
+      </attribute>
+    </zeroOrMore>
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_info_license">
+  <element name="license">
+    <optional>
+      <attribute name="href">
+        <text/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <attribute>
+        <anyName>
+          <except>
+            <nsName ns="http://projectmallard.org/1.0/"/>
+            <nsName ns=""/>
+          </except>
+        </anyName>
+        <text/>
+      </attribute>
+    </zeroOrMore>
+    <oneOrMore>
+      <ref name="mal_block"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="mal_info_desc">
+  <element name="desc">
+    <zeroOrMore>
+      <attribute>
+        <anyName>
+          <except>
+            <nsName ns="http://projectmallard.org/1.0/"/>
+            <nsName ns=""/>
+          </except>
+        </anyName>
+        <text/>
+      </attribute>
+    </zeroOrMore>
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_info_revision">
+  <element name="revision">
+    <optional>
+      <attribute name="version">
+        <text/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="docversion">
+        <text/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="pkgversion">
+        <text/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="date">
+        <data type="date" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="status">
+        <choice>
+          <value>stub</value>
+          <value>incomplete</value>
+          <value>draft</value>
+          <value>outdated</value>
+          <value>review</value>
+          <value>candidate</value>
+          <value>final</value>
+        </choice>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <attribute>
+        <anyName>
+          <except>
+            <nsName ns="http://projectmallard.org/1.0/"/>
+            <nsName ns=""/>
+          </except>
+        </anyName>
+        <text/>
+      </attribute>
+    </zeroOrMore>
+    <optional>
+      <ref name="mal_block_title"/>
+    </optional>
+    <optional>
+      <ref name="mal_block_desc"/>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_external"/>
+    </zeroOrMore>
+  </element>
+</define>
+
+<define name="mal_info_years">
+  <element name="years">
+    <zeroOrMore>
+      <attribute>
+        <anyName>
+          <except>
+            <nsName ns="http://projectmallard.org/1.0/"/>
+            <nsName ns=""/>
+          </except>
+        </anyName>
+        <text/>
+      </attribute>
+    </zeroOrMore>
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_info_email">
+  <element name="email">
+    <zeroOrMore>
+      <attribute>
+        <anyName>
+          <except>
+            <nsName ns="http://projectmallard.org/1.0/"/>
+            <nsName ns=""/>
+          </except>
+        </anyName>
+        <text/>
+      </attribute>
+    </zeroOrMore>
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_info_name">
+  <element name="name">
+    <zeroOrMore>
+      <attribute>
+        <anyName>
+          <except>
+            <nsName ns="http://projectmallard.org/1.0/"/>
+            <nsName ns=""/>
+          </except>
+        </anyName>
+        <text/>
+      </attribute>
+    </zeroOrMore>
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_block">
+  <choice>
+    <ref name="mal_block_basic"/>
+    <ref name="mal_block_formal"/>
+    <ref name="mal_block_lists"/>
+    <ref name="mal_table"/>
+  </choice>
+</define>
+
+<define name="mal_block_basic">
+  <choice>
+    <ref name="mal_block_code"/>
+    <ref name="mal_block_example"/>
+    <ref name="mal_block_media"/>
+    <ref name="mal_block_p"/>
+    <ref name="mal_block_screen"/>
+  </choice>
+</define>
+
+<define name="mal_block_formal">
+  <choice>
+    <ref name="mal_block_comment"/>
+    <ref name="mal_block_figure"/>
+    <ref name="mal_block_listing"/>
+    <ref name="mal_block_note"/>
+    <ref name="mal_block_quote"/>
+    <ref name="mal_block_synopsis"/>
+  </choice>
+</define>
+
+<define name="mal_block_lists">
+  <choice>
+    <ref name="mal_block_list"/>
+    <ref name="mal_block_steps"/>
+    <ref name="mal_block_terms"/>
+    <ref name="mal_block_tree"/>
+  </choice>
+</define>
+
+<define name="mal_block_code">
+  <element name="code">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="mime">
+        <text/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_block_example">
+  <element name="example">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <oneOrMore>
+      <ref name="mal_block"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="mal_block_media">
+  <element name="media">
+    <optional>
+      <attribute name="type">
+        <choice>
+          <value>image</value>
+          <value>video</value>
+          <value>audio</value>
+          <value>application</value>
+        </choice>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="mime">
+        <text/>
+      </attribute>
+    </optional>
+    <attribute name="src">
+      <text/>
+    </attribute>
+    <optional>
+      <attribute name="height">
+        <text/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="width">
+        <text/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <zeroOrMore>
+      <ref name="mal_block"/>
+    </zeroOrMore>
+  </element>
+</define>
+
+<define name="mal_block_p">
+  <element name="p">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_block_screen">
+  <element name="screen">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="mime">
+        <text/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_block_quote">
+  <element name="quote">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <optional>
+      <ref name="mal_block_title"/>
+    </optional>
+    <ref name="mal_block_cite"/>
+    <oneOrMore>
+      <ref name="mal_block"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="mal_block_comment">
+  <element name="comment">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <optional>
+      <ref name="mal_block_title"/>
+    </optional>
+    <ref name="mal_block_cite"/>
+    <oneOrMore>
+      <ref name="mal_block"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="mal_block_figure">
+  <element name="figure">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <optional>
+      <ref name="mal_block_title"/>
+    </optional>
+    <optional>
+      <ref name="mal_block_desc"/>
+    </optional>
+    <oneOrMore>
+      <ref name="mal_block"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="mal_block_listing">
+  <element name="listing">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <optional>
+      <ref name="mal_block_title"/>
+    </optional>
+    <optional>
+      <ref name="mal_block_desc"/>
+    </optional>
+    <oneOrMore>
+      <ref name="mal_block"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="mal_block_note">
+  <element name="note">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <optional>
+      <ref name="mal_block_title"/>
+    </optional>
+    <oneOrMore>
+      <ref name="mal_block"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="mal_block_synopsis">
+  <element name="synopsis">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <optional>
+      <ref name="mal_block_title"/>
+    </optional>
+    <optional>
+      <ref name="mal_block_desc"/>
+    </optional>
+    <oneOrMore>
+      <ref name="mal_block"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="mal_block_list">
+  <element name="list">
+    <optional>
+      <attribute name="type">
+        <data type="NMTOKEN" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <optional>
+      <ref name="mal_block_title"/>
+    </optional>
+    <oneOrMore>
+      <ref name="mal_block_list_item"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="mal_block_list_item">
+  <element name="item">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <oneOrMore>
+      <ref name="mal_block"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="mal_block_terms">
+  <element name="terms">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <optional>
+      <ref name="mal_block_title"/>
+    </optional>
+    <oneOrMore>
+      <ref name="mal_block_terms_item"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="mal_block_terms_item">
+  <element name="item">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <oneOrMore>
+      <ref name="mal_block_title"/>
+    </oneOrMore>
+    <oneOrMore>
+      <ref name="mal_block"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="mal_block_steps">
+  <element name="steps">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <optional>
+      <ref name="mal_block_title"/>
+    </optional>
+    <oneOrMore>
+      <ref name="mal_block_steps_item"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="mal_block_steps_item">
+  <element name="item">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <oneOrMore>
+      <ref name="mal_block"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="mal_block_tree">
+  <element name="tree">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <optional>
+      <ref name="mal_block_title"/>
+    </optional>
+    <oneOrMore>
+      <ref name="mal_block_tree_item"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="mal_block_tree_item">
+  <element name="item">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <ref name="mal_inline"/>
+    <zeroOrMore>
+      <ref name="mal_block_tree_item"/>
+    </zeroOrMore>
+  </element>
+</define>
+
+<define name="mal_table_col">
+  <element name="col">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <attribute>
+        <anyName>
+          <except>
+            <nsName ns="http://projectmallard.org/1.0/"/>
+            <nsName ns=""/>
+          </except>
+        </anyName>
+        <text/>
+      </attribute>
+    </zeroOrMore>
+  </element>
+</define>
+
+<define name="mal_table_colgroup">
+  <element name="colgroup">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <attribute>
+        <anyName>
+          <except>
+            <nsName ns="http://projectmallard.org/1.0/"/>
+            <nsName ns=""/>
+          </except>
+        </anyName>
+        <text/>
+      </attribute>
+    </zeroOrMore>
+    <zeroOrMore>
+      <ref name="mal_table_col"/>
+    </zeroOrMore>
+  </element>
+</define>
+
+<define name="mal_table_tr">
+  <element name="tr">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <attribute>
+        <anyName>
+          <except>
+            <nsName ns="http://projectmallard.org/1.0/"/>
+            <nsName ns=""/>
+          </except>
+        </anyName>
+        <text/>
+      </attribute>
+    </zeroOrMore>
+    <zeroOrMore>
+      <ref name="mal_table_td"/>
+    </zeroOrMore>
+  </element>
+</define>
+
+<define name="mal_table_thead">
+  <element name="thead">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <attribute>
+        <anyName>
+          <except>
+            <nsName ns="http://projectmallard.org/1.0/"/>
+            <nsName ns=""/>
+          </except>
+        </anyName>
+        <text/>
+      </attribute>
+    </zeroOrMore>
+    <oneOrMore>
+      <ref name="mal_table_tr"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="mal_table_tbody">
+  <element name="tbody">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <attribute>
+        <anyName>
+          <except>
+            <nsName ns="http://projectmallard.org/1.0/"/>
+            <nsName ns=""/>
+          </except>
+        </anyName>
+        <text/>
+      </attribute>
+    </zeroOrMore>
+    <oneOrMore>
+      <ref name="mal_table_tr"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="mal_table_tfoot">
+  <element name="tfoot">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <attribute>
+        <anyName>
+          <except>
+            <nsName ns="http://projectmallard.org/1.0/"/>
+            <nsName ns=""/>
+          </except>
+        </anyName>
+        <text/>
+      </attribute>
+    </zeroOrMore>
+    <oneOrMore>
+      <ref name="mal_table_tr"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="mal_table_td">
+  <element name="td">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <attribute>
+        <anyName>
+          <except>
+            <nsName ns="http://projectmallard.org/1.0/"/>
+            <nsName ns=""/>
+          </except>
+        </anyName>
+        <text/>
+      </attribute>
+    </zeroOrMore>
+    <optional>
+      <attribute name="rowspan">
+        <text/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="colspan">
+        <text/>
+      </attribute>
+    </optional>
+    <oneOrMore>
+      <ref name="mal_block"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="mal_table">
+  <element name="table">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <attribute>
+        <anyName>
+          <except>
+            <nsName ns="http://projectmallard.org/1.0/"/>
+            <nsName ns=""/>
+          </except>
+        </anyName>
+        <text/>
+      </attribute>
+    </zeroOrMore>
+    <optional>
+      <attribute name="frame">
+        <choice>
+          <value>all</value>
+          <value>none</value>
+          <list>
+            <zeroOrMore>
+              <choice>
+                <value>top</value>
+                <value>bottom</value>
+                <value>left</value>
+                <value>right</value>
+              </choice>
+            </zeroOrMore>
+          </list>
+        </choice>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="rules">
+        <choice>
+          <value>all</value>
+          <value>groups</value>
+          <value>none</value>
+          <list>
+            <zeroOrMore>
+              <choice>
+                <value>rows</value>
+                <value>rowgroups</value>
+                <value>cols</value>
+                <value>colgroups</value>
+              </choice>
+            </zeroOrMore>
+          </list>
+        </choice>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="shade">
+        <choice>
+          <value>all</value>
+          <value>groups</value>
+          <value>none</value>
+          <list>
+            <zeroOrMore>
+              <choice>
+                <value>rows</value>
+                <value>rowgroups</value>
+                <value>cols</value>
+                <value>colgroups</value>
+              </choice>
+            </zeroOrMore>
+          </list>
+        </choice>
+      </attribute>
+    </optional>
+    <optional>
+      <ref name="mal_block_title"/>
+    </optional>
+    <optional>
+      <ref name="mal_block_desc"/>
+    </optional>
+    <optional>
+      <choice>
+        <oneOrMore>
+          <ref name="mal_table_col"/>
+        </oneOrMore>
+        <oneOrMore>
+          <ref name="mal_table_colgroup"/>
+        </oneOrMore>
+      </choice>
+    </optional>
+    <choice>
+      <oneOrMore>
+        <ref name="mal_table_tr"/>
+      </oneOrMore>
+      <group>
+        <optional>
+          <ref name="mal_table_thead"/>
+        </optional>
+        <oneOrMore>
+          <ref name="mal_table_tbody"/>
+        </oneOrMore>
+        <optional>
+          <ref name="mal_table_tfoot"/>
+        </optional>
+      </group>
+    </choice>
+  </element>
+</define>
+
+<define name="mal_block_desc">
+  <element name="desc">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <attribute>
+        <anyName>
+          <except>
+            <nsName ns="http://projectmallard.org/1.0/"/>
+            <nsName ns=""/>
+          </except>
+        </anyName>
+        <text/>
+      </attribute>
+    </zeroOrMore>
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_block_cite">
+  <element name="cite">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <attribute>
+        <anyName>
+          <except>
+            <nsName ns="http://projectmallard.org/1.0/"/>
+            <nsName ns=""/>
+          </except>
+        </anyName>
+        <text/>
+      </attribute>
+    </zeroOrMore>
+    <optional>
+      <attribute name="date">
+        <text/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="href">
+        <text/>
+      </attribute>
+    </optional>
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_block_subtitle">
+  <element name="subtitle">
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_block_title">
+  <element name="title">
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_inline">
+  <interleave>
+    <zeroOrMore>
+      <ref name="mal_inline_app"/>
+    </zeroOrMore>
+    <zeroOrMore>
+      <ref name="mal_inline_cmd"/>
+    </zeroOrMore>
+    <zeroOrMore>
+      <ref name="mal_inline_code"/>
+    </zeroOrMore>
+    <zeroOrMore>
+      <ref name="mal_inline_em"/>
+    </zeroOrMore>
+    <zeroOrMore>
+      <ref name="mal_inline_file"/>
+    </zeroOrMore>
+    <zeroOrMore>
+      <ref name="mal_inline_gui"/>
+    </zeroOrMore>
+    <zeroOrMore>
+      <ref name="mal_inline_guiseq"/>
+    </zeroOrMore>
+    <zeroOrMore>
+      <ref name="mal_inline_input"/>
+    </zeroOrMore>
+    <zeroOrMore>
+      <ref name="mal_inline_key"/>
+    </zeroOrMore>
+    <zeroOrMore>
+      <ref name="mal_inline_keyseq"/>
+    </zeroOrMore>
+    <zeroOrMore>
+      <ref name="mal_inline_link"/>
+    </zeroOrMore>
+    <zeroOrMore>
+      <ref name="mal_inline_media"/>
+    </zeroOrMore>
+    <zeroOrMore>
+      <ref name="mal_inline_output"/>
+    </zeroOrMore>
+    <zeroOrMore>
+      <ref name="mal_inline_span"/>
+    </zeroOrMore>
+    <zeroOrMore>
+      <ref name="mal_inline_sys"/>
+    </zeroOrMore>
+    <zeroOrMore>
+      <ref name="mal_inline_var"/>
+    </zeroOrMore>
+    <zeroOrMore>
+      <element>
+        <anyName>
+          <except>
+            <nsName ns="http://projectmallard.org/1.0/"/>
+            <nsName ns=""/>
+          </except>
+        </anyName>
+        <ref name="mal_inline"/>
+      </element>
+    </zeroOrMore>
+    <optional>
+      <text/>
+    </optional>
+  </interleave>
+</define>
+
+<define name="mal_inline_app">
+  <element name="app">
+    <optional>
+      <ref name="mal_attr_link"/>
+    </optional>
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_inline_code">
+  <element name="code">
+    <optional>
+      <ref name="mal_attr_link"/>
+    </optional>
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="mime">
+        <text/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_inline_cmd">
+  <element name="cmd">
+    <optional>
+      <ref name="mal_attr_link"/>
+    </optional>
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="mime">
+        <text/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_inline_output">
+  <element name="output">
+    <optional>
+      <ref name="mal_attr_link"/>
+    </optional>
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_inline_em">
+  <element name="em">
+    <optional>
+      <ref name="mal_attr_link"/>
+    </optional>
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_inline_file">
+  <element name="file">
+    <optional>
+      <ref name="mal_attr_link"/>
+    </optional>
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_inline_gui">
+  <element name="gui">
+    <optional>
+      <ref name="mal_attr_link"/>
+    </optional>
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_inline_guiseq">
+  <element name="guiseq">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <mixed>
+      <oneOrMore>
+        <ref name="mal_inline_gui"/>
+      </oneOrMore>
+    </mixed>
+  </element>
+</define>
+
+<define name="mal_inline_link">
+  <element name="link">
+    <choice>
+      <attribute name="xref">
+        <text/>
+      </attribute>
+      <attribute name="href">
+        <text/>
+      </attribute>
+      <group>
+        <attribute name="xref">
+          <text/>
+        </attribute>
+        <attribute name="href">
+          <text/>
+        </attribute>
+      </group>
+    </choice>
+    <optional>
+      <attribute name="role">
+        <text/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_inline_media">
+  <element name="media">
+    <optional>
+      <ref name="mal_attr_link"/>
+    </optional>
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="type">
+        <choice>
+          <value>image</value>
+          <value>video</value>
+          <value>audio</value>
+          <value>application</value>
+        </choice>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="mime">
+        <text/>
+      </attribute>
+    </optional>
+    <attribute name="src">
+      <text/>
+    </attribute>
+    <optional>
+      <attribute name="height">
+        <text/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="width">
+        <text/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_inline_keyseq">
+  <element name="keyseq">
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="type">
+        <choice>
+          <value>combo</value>
+          <value>sequence</value>
+        </choice>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <mixed>
+      <zeroOrMore>
+        <choice>
+          <ref name="mal_inline_key"/>
+          <ref name="mal_inline_keyseq"/>
+        </choice>
+      </zeroOrMore>
+    </mixed>
+  </element>
+</define>
+
+<define name="mal_inline_key">
+  <element name="key">
+    <optional>
+      <ref name="mal_attr_link"/>
+    </optional>
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_inline_span">
+  <element name="span">
+    <optional>
+      <ref name="mal_attr_link"/>
+    </optional>
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_inline_sys">
+  <element name="sys">
+    <optional>
+      <ref name="mal_attr_link"/>
+    </optional>
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_inline_input">
+  <element name="input">
+    <optional>
+      <ref name="mal_attr_link"/>
+    </optional>
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_inline_var">
+  <element name="var">
+    <optional>
+      <ref name="mal_attr_link"/>
+    </optional>
+    <optional>
+      <attribute name="style">
+        <data type="NMTOKENS" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
+      </attribute>
+    </optional>
+    <zeroOrMore>
+      <ref name="mal_attr_external"/>
+    </zeroOrMore>
+    <ref name="mal_inline"/>
+  </element>
+</define>
+
+<define name="mal_external">
+  <element>
+    <anyName>
+      <except>
+        <nsName ns="http://projectmallard.org/1.0/"/>
+        <nsName ns=""/>
+      </except>
+    </anyName>
+    <zeroOrMore>
+      <attribute>
+        <anyName/>
+        <text/>
+      </attribute>
+    </zeroOrMore>
+    <zeroOrMore>
+      <ref name="mal_anything"/>
+    </zeroOrMore>
+  </element>
+</define>
+
+<define name="mal_anything">
+  <element>
+    <anyName/>
+    <zeroOrMore>
+      <attribute>
+        <anyName/>
+        <text/>
+      </attribute>
+    </zeroOrMore>
+    <zeroOrMore>
+      <ref name="mal_anything"/>
+    </zeroOrMore>
+  </element>
+</define>
+
+<define name="mal_attr_external">
+  <attribute>
+    <anyName>
+      <except>
+        <nsName ns="http://projectmallard.org/1.0/"/>
+        <nsName ns=""/>
+      </except>
+    </anyName>
+    <text/>
+  </attribute>
+</define>
+
+<define name="mal_attr_link">
+  <choice>
+    <optional>
+      <attribute name="xref">
+        <text/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="dref">
+        <text/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="href">
+        <text/>
+      </attribute>
+    </optional>
+  </choice>
+</define>
+</grammar>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]