diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/stex/schema/rng/omdocdoc.rng')
-rw-r--r-- | Master/texmf-dist/source/latex/stex/schema/rng/omdocdoc.rng | 240 |
1 files changed, 240 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/omdocdoc.rng b/Master/texmf-dist/source/latex/stex/schema/rng/omdocdoc.rng new file mode 100644 index 00000000000..bac94d26352 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/omdocdoc.rng @@ -0,0 +1,240 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + A RelaxNG for Open Mathematical documents (OMDoc 1.3) Module DOC + $Id: omdocdoc.rnc 8972 2011-09-09 11:36:34Z kohlhase $ + $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/omdocdoc.rnc $ + See the documentation and examples at http://www.omdoc.org + Copyright (c) 2004-2007 Michael Kohlhase, released under the GNU Public License (GPL) +--> +<grammar ns="http://omdoc.org/ns" xmlns:omdoc="http://omdoc.org/ns" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"> + <!-- extend the stuff that can go into a mathematical text --> + <define name="omdoc.class" combine="interleave"> + <interleave> + <zeroOrMore> + <ref name="ignore"/> + </zeroOrMore> + <zeroOrMore> + <ref name="tableofcontents"/> + </zeroOrMore> + </interleave> + </define> + <define name="ignore.attribs"> + <interleave> + <ref name="id.attribs"/> + <optional> + <attribute name="type"> + <data type="string"/> + </attribute> + </optional> + <optional> + <attribute name="comment"> + <data type="string"/> + </attribute> + </optional> + </interleave> + </define> + <define name="ignore.model"> + <ref name="Anything"/> + </define> + <define name="ignore"> + <element name="ignore"> + <choice> + <ref name="tref"/> + <interleave> + <ref name="ignore.attribs"/> + <ref name="ignore.model"/> + </interleave> + </choice> + </element> + </define> + <define name="tableofcontents.attribs"> + <optional> + <attribute name="level"> + <data type="nonNegativeInteger"/> + </attribute> + </optional> + </define> + <define name="tableofcontents.model"> + <empty/> + </define> + <define name="tableofcontents"> + <element name="tableofcontents"> + <choice> + <ref name="tref"/> + <interleave> + <ref name="tableofcontents.attribs"/> + <ref name="tableofcontents.model"/> + </interleave> + </choice> + </element> + </define> + <define name="index.attribs"> + <ref name="id.attribs"/> + </define> + <define name="index.model"> + <empty/> + </define> + <define name="index"> + <element name="index"> + <choice> + <ref name="tref"/> + <interleave> + <ref name="index.attribs"/> + <ref name="index.model"/> + </interleave> + </choice> + </element> + </define> + <define name="bibliography.attribs"> + <ref name="id.attribs"/> + <attribute name="files"/> + </define> + <define name="bibliography.model"> + <empty/> + </define> + <define name="bibliography"> + <element name="bibliography"> + <choice> + <ref name="tref"/> + <interleave> + <ref name="bibliography.attribs"/> + <ref name="bibliography.model"/> + </interleave> + </choice> + </element> + </define> + <define name="group.attribs"> + <ref name="id.attribs"/> + <optional> + <attribute name="type"> + <data type="anyURI"/> + </attribute> + </optional> + <optional> + <attribute name="modules"> + <data type="anyURI"/> + </attribute> + </optional> + <optional> + <attribute name="layout"/> + </optional> + </define> + <define name="frontmatter"> + <a:documentation>The <omdoc> and <omgroup> elements allow frontmatter and backmatter, +which we will now define</a:documentation> + <interleave> + <ref name="metadata.class"/> + <optional> + <ref name="tableofcontents"/> + </optional> + </interleave> + </define> + <define name="backmatter"> + <interleave> + <optional> + <ref name="index"/> + </optional> + <optional> + <ref name="bibliography"/> + </optional> + </interleave> + </define> + <define name="docstruct.class"> + <zeroOrMore> + <ref name="omgroup"/> + </zeroOrMore> + </define> + <define name="omdoc.class" combine="interleave"> + <ref name="docstruct.class"/> + </define> + <define name="mainmatter"> + <ref name="omdoc.class"/> + </define> + <define name="omgroup.attribs"> + <interleave> + <ref name="toplevel.attribs"/> + <ref name="group.attribs"/> + </interleave> + </define> + <define name="omgroup.model"> + <ref name="frontmatter"/> + <ref name="mainmatter"/> + <ref name="backmatter"/> + </define> + <define name="omgroup"> + <element name="omgroup"> + <choice> + <ref name="tref"/> + <interleave> + <ref name="omgroup.attribs"/> + <ref name="omgroup.model"/> + </interleave> + </choice> + </element> + </define> + <define name="omdoc.attribs"> + <a:documentation>the model of the document root only differs from <omgroup> in the version attribute</a:documentation> + <interleave> + <ref name="toplevel.attribs"/> + <ref name="group.attribs"/> + <optional> + <attribute name="version"> + <data type="string"> + <param name="pattern">1.3</param> + </data> + </attribute> + </optional> + </interleave> + </define> + <define name="omdoc.model"> + <ref name="frontmatter"/> + <ref name="mainmatter"/> + <ref name="backmatter"/> + </define> + <define name="omdoc"> + <element name="omdoc"> + <choice> + <ref name="tref"/> + <interleave> + <ref name="omdoc.attribs"/> + <ref name="omdoc.model"/> + </interleave> + </choice> + </element> + </define> + <!-- the following is for legacy only, and will be removed soon. --> + <define name="ref.attribs"> + <a:documentation>deprecated ################################</a:documentation> + <interleave> + <ref name="id.attribs"/> + <ref name="xref.attrib"/> + <attribute name="type"> + <choice> + <value>include</value> + <value>cite</value> + </choice> + </attribute> + </interleave> + </define> + <define name="ref.model"> + <empty/> + </define> + <define name="ref"> + <element name="ref"> + <interleave> + <ref name="ref.attribs"/> + <ref name="ref.model"/> + </interleave> + </element> + </define> + <define name="omdoc.class" combine="interleave"> + <zeroOrMore> + <ref name="ref"/> + </zeroOrMore> + </define> + <define name="inline.class" combine="interleave"> + <zeroOrMore> + <ref name="ref"/> + </zeroOrMore> + </define> +</grammar> |