mml 2.3.0 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitmodules +9 -0
- data/.rubocop.yml +4 -0
- data/.rubocop_todo.yml +83 -18
- data/Gemfile +0 -2
- data/README.adoc +176 -47
- data/Rakefile +16 -1
- data/lib/mml/base/common_attributes.rb +44 -0
- data/lib/mml/base/content/annotation.rb +28 -0
- data/lib/mml/base/content/annotation_xml.rb +31 -0
- data/lib/mml/base/content/apply.rb +27 -0
- data/lib/mml/base/content/arith.rb +243 -0
- data/lib/mml/base/content/bind.rb +27 -0
- data/lib/mml/base/content/bvar.rb +20 -0
- data/lib/mml/base/content/calculus.rb +103 -0
- data/lib/mml/base/content/cbytes.rb +24 -0
- data/lib/mml/base/content/cerror.rb +24 -0
- data/lib/mml/base/content/ci.rb +77 -0
- data/lib/mml/base/content/cn.rb +33 -0
- data/lib/mml/base/content/condition.rb +20 -0
- data/lib/mml/base/content/constants.rb +173 -0
- data/lib/mml/base/content/cs.rb +22 -0
- data/lib/mml/base/content/csymbol.rb +79 -0
- data/lib/mml/base/content/declare.rb +34 -0
- data/lib/mml/base/content/degree.rb +20 -0
- data/lib/mml/base/content/elementary_functions.rb +309 -0
- data/lib/mml/base/content/fn.rb +25 -0
- data/lib/mml/base/content/functions.rb +85 -0
- data/lib/mml/base/content/interval.rb +24 -0
- data/lib/mml/base/content/inverse.rb +25 -0
- data/lib/mml/base/content/lambda.rb +20 -0
- data/lib/mml/base/content/linear_algebra.rb +122 -0
- data/lib/mml/base/content/logic.rb +93 -0
- data/lib/mml/base/content/otherwise.rb +20 -0
- data/lib/mml/base/content/piece.rb +20 -0
- data/lib/mml/base/content/piecewise.rb +20 -0
- data/lib/mml/base/content/relations.rb +113 -0
- data/lib/mml/base/content/reln.rb +19 -0
- data/lib/mml/base/content/semantics.rb +27 -0
- data/lib/mml/base/content/sep.rb +19 -0
- data/lib/mml/base/content/sets.rb +163 -0
- data/lib/mml/base/content/share.rb +22 -0
- data/lib/mml/base/content/statistics.rb +95 -0
- data/lib/mml/base/content/vector_calculus.rb +63 -0
- data/lib/mml/base/content_loader.rb +195 -0
- data/lib/mml/base/maction.rb +1 -0
- data/lib/mml/base/math.rb +47 -0
- data/lib/mml/base/menclose.rb +1 -1
- data/lib/mml/base/mfenced.rb +2 -2
- data/lib/mml/base/mglyph.rb +2 -2
- data/lib/mml/base/mi.rb +9 -6
- data/lib/mml/base/mlabeledtr.rb +2 -6
- data/lib/mml/base/mn.rb +3 -2
- data/lib/mml/base/mo.rb +3 -3
- data/lib/mml/base/mrow.rb +0 -2
- data/lib/mml/base/ms.rb +4 -6
- data/lib/mml/base/mscarries.rb +1 -1
- data/lib/mml/base/mspace.rb +0 -2
- data/lib/mml/base/mstyle.rb +4 -8
- data/lib/mml/base/mtable.rb +8 -0
- data/lib/mml/base/mtd.rb +6 -0
- data/lib/mml/base/mtext.rb +0 -2
- data/lib/mml/base/semantics.rb +4 -2
- data/lib/mml/base/universal_presentation_attributes.rb +46 -0
- data/lib/mml/base/v3_common.rb +16 -0
- data/lib/mml/base/v3_presentation_attributes.rb +15 -0
- data/lib/mml/base/v4_attributes.rb +4 -18
- data/lib/mml/base.rb +11 -0
- data/lib/mml/common_elements.rb +336 -0
- data/lib/mml/context_configuration.rb +29 -0
- data/lib/mml/v2/annotation.rb +9 -0
- data/lib/mml/v2/annotation_xml.rb +9 -0
- data/lib/mml/v2/apply.rb +9 -0
- data/lib/mml/v2/arith.rb +93 -0
- data/lib/mml/v2/bind.rb +9 -0
- data/lib/mml/v2/bvar.rb +9 -0
- data/lib/mml/v2/calculus.rb +33 -0
- data/lib/mml/v2/ci.rb +9 -0
- data/lib/mml/v2/cn.rb +9 -0
- data/lib/mml/v2/common_elements.rb +34 -0
- data/lib/mml/v2/condition.rb +9 -0
- data/lib/mml/v2/configuration.rb +13 -0
- data/lib/mml/v2/constants.rb +65 -0
- data/lib/mml/v2/csymbol.rb +9 -0
- data/lib/mml/v2/degree.rb +9 -0
- data/lib/mml/v2/elementary_functions.rb +121 -0
- data/lib/mml/v2/fn.rb +9 -0
- data/lib/mml/v2/functions.rb +29 -0
- data/lib/mml/v2/interval.rb +9 -0
- data/lib/mml/v2/inverse.rb +9 -0
- data/lib/mml/v2/lambda.rb +9 -0
- data/lib/mml/v2/linear_algebra.rb +41 -0
- data/lib/mml/v2/logic.rb +33 -0
- data/lib/mml/v2/maction.rb +9 -0
- data/lib/mml/v2/maligngroup.rb +9 -0
- data/lib/mml/v2/malignmark.rb +9 -0
- data/lib/mml/v2/math.rb +11 -0
- data/lib/mml/v2/menclose.rb +9 -0
- data/lib/mml/v2/merror.rb +9 -0
- data/lib/mml/v2/mfenced.rb +9 -0
- data/lib/mml/v2/mfrac.rb +9 -0
- data/lib/mml/v2/mfraction.rb +9 -0
- data/lib/mml/v2/mglyph.rb +9 -0
- data/lib/mml/v2/mi.rb +9 -0
- data/lib/mml/v2/mlabeledtr.rb +9 -0
- data/lib/mml/v2/mlongdiv.rb +9 -0
- data/lib/mml/v2/mmultiscripts.rb +9 -0
- data/lib/mml/v2/mn.rb +9 -0
- data/lib/mml/v2/mo.rb +10 -0
- data/lib/mml/v2/mover.rb +9 -0
- data/lib/mml/v2/mpadded.rb +9 -0
- data/lib/mml/v2/mphantom.rb +9 -0
- data/lib/mml/v2/mprescripts.rb +9 -0
- data/lib/mml/v2/mroot.rb +9 -0
- data/lib/mml/v2/mrow.rb +9 -0
- data/lib/mml/v2/ms.rb +9 -0
- data/lib/mml/v2/mscarries.rb +9 -0
- data/lib/mml/v2/mscarry.rb +9 -0
- data/lib/mml/v2/msgroup.rb +9 -0
- data/lib/mml/v2/msline.rb +9 -0
- data/lib/mml/v2/mspace.rb +9 -0
- data/lib/mml/v2/msqrt.rb +9 -0
- data/lib/mml/v2/msrow.rb +9 -0
- data/lib/mml/v2/mstack.rb +9 -0
- data/lib/mml/v2/mstyle.rb +10 -0
- data/lib/mml/v2/msub.rb +9 -0
- data/lib/mml/v2/msubsup.rb +9 -0
- data/lib/mml/v2/msup.rb +9 -0
- data/lib/mml/v2/mtable.rb +9 -0
- data/lib/mml/v2/mtd.rb +9 -0
- data/lib/mml/v2/mtext.rb +9 -0
- data/lib/mml/v2/mtr.rb +9 -0
- data/lib/mml/v2/munder.rb +9 -0
- data/lib/mml/v2/munderover.rb +9 -0
- data/lib/mml/v2/namespace.rb +7 -0
- data/lib/mml/v2/none.rb +9 -0
- data/lib/mml/v2/otherwise.rb +9 -0
- data/lib/mml/v2/piece.rb +9 -0
- data/lib/mml/v2/piecewise.rb +9 -0
- data/lib/mml/v2/relations.rb +41 -0
- data/lib/mml/v2/reln.rb +13 -0
- data/lib/mml/v2/semantics.rb +9 -0
- data/lib/mml/v2/sep.rb +9 -0
- data/lib/mml/v2/sets.rb +57 -0
- data/lib/mml/v2/statistics.rb +33 -0
- data/lib/mml/v2/vector_calculus.rb +21 -0
- data/lib/mml/v2.rb +311 -0
- data/lib/mml/v3/annotation.rb +10 -0
- data/lib/mml/v3/annotation_xml.rb +10 -0
- data/lib/mml/v3/apply.rb +10 -0
- data/lib/mml/v3/arith.rb +115 -0
- data/lib/mml/v3/bind.rb +10 -0
- data/lib/mml/v3/calculus.rb +40 -0
- data/lib/mml/v3/cbytes.rb +10 -0
- data/lib/mml/v3/cerror.rb +10 -0
- data/lib/mml/v3/ci.rb +10 -0
- data/lib/mml/v3/cn.rb +10 -0
- data/lib/mml/v3/common_elements.rb +34 -0
- data/lib/mml/v3/constants.rb +80 -0
- data/lib/mml/v3/constructs.rb +55 -0
- data/lib/mml/v3/cs.rb +10 -0
- data/lib/mml/v3/csymbol.rb +10 -0
- data/lib/mml/v3/deprecated_content.rb +29 -0
- data/lib/mml/v3/elementary_functions.rb +145 -0
- data/lib/mml/v3/functions.rb +35 -0
- data/lib/mml/v3/linear_algebra.rb +50 -0
- data/lib/mml/v3/logic.rb +40 -0
- data/lib/mml/v3/maction.rb +1 -1
- data/lib/mml/v3/math.rb +7 -1
- data/lib/mml/v3/mi.rb +1 -0
- data/lib/mml/v3/mn.rb +1 -0
- data/lib/mml/v3/mo.rb +1 -0
- data/lib/mml/v3/mrow.rb +1 -0
- data/lib/mml/v3/ms.rb +1 -0
- data/lib/mml/v3/mstyle.rb +1 -0
- data/lib/mml/v3/mtext.rb +1 -0
- data/lib/mml/v3/relations.rb +50 -0
- data/lib/mml/v3/sets.rb +70 -0
- data/lib/mml/v3/statistics.rb +40 -0
- data/lib/mml/v3/vector_calculus.rb +25 -0
- data/lib/mml/v3.rb +25 -0
- data/lib/mml/v4/a.rb +4 -3
- data/lib/mml/v4/annotation.rb +10 -0
- data/lib/mml/v4/annotation_xml.rb +14 -0
- data/lib/mml/v4/apply.rb +9 -0
- data/lib/mml/v4/arith.rb +93 -0
- data/lib/mml/v4/calculus.rb +25 -0
- data/lib/mml/v4/cbytes.rb +9 -0
- data/lib/mml/v4/cerror.rb +9 -0
- data/lib/mml/v4/ci.rb +9 -0
- data/lib/mml/v4/cn.rb +9 -0
- data/lib/mml/v4/common_elements.rb +33 -0
- data/lib/mml/v4/constants.rb +65 -0
- data/lib/mml/v4/constructs.rb +49 -0
- data/lib/mml/v4/cs.rb +9 -0
- data/lib/mml/v4/csymbol.rb +9 -0
- data/lib/mml/v4/deprecated_content.rb +25 -0
- data/lib/mml/v4/elementary_functions.rb +118 -0
- data/lib/mml/v4/factorof.rb +9 -0
- data/lib/mml/v4/functions.rb +30 -0
- data/lib/mml/v4/limit.rb +9 -0
- data/lib/mml/v4/linear_algebra.rb +41 -0
- data/lib/mml/v4/logic.rb +33 -0
- data/lib/mml/v4/maction.rb +1 -2
- data/lib/mml/v4/maligngroup.rb +0 -1
- data/lib/mml/v4/malignmark.rb +0 -1
- data/lib/mml/v4/math.rb +1 -1
- data/lib/mml/v4/menclose.rb +0 -1
- data/lib/mml/v4/merror.rb +0 -1
- data/lib/mml/v4/mfenced.rb +0 -1
- data/lib/mml/v4/mfrac.rb +0 -1
- data/lib/mml/v4/mfraction.rb +0 -1
- data/lib/mml/v4/mglyph.rb +0 -1
- data/lib/mml/v4/mi.rb +1 -1
- data/lib/mml/v4/mlabeledtr.rb +0 -1
- data/lib/mml/v4/mlongdiv.rb +0 -1
- data/lib/mml/v4/mmultiscripts.rb +0 -1
- data/lib/mml/v4/mn.rb +1 -1
- data/lib/mml/v4/mo.rb +1 -1
- data/lib/mml/v4/mover.rb +0 -1
- data/lib/mml/v4/mpadded.rb +0 -1
- data/lib/mml/v4/mphantom.rb +0 -1
- data/lib/mml/v4/mprescripts.rb +0 -1
- data/lib/mml/v4/mroot.rb +0 -1
- data/lib/mml/v4/mrow.rb +1 -1
- data/lib/mml/v4/ms.rb +1 -1
- data/lib/mml/v4/mscarries.rb +0 -1
- data/lib/mml/v4/mscarry.rb +0 -1
- data/lib/mml/v4/msgroup.rb +0 -1
- data/lib/mml/v4/msline.rb +0 -1
- data/lib/mml/v4/mspace.rb +0 -1
- data/lib/mml/v4/msqrt.rb +0 -1
- data/lib/mml/v4/msrow.rb +0 -1
- data/lib/mml/v4/mstack.rb +0 -1
- data/lib/mml/v4/mstyle.rb +1 -1
- data/lib/mml/v4/msub.rb +0 -1
- data/lib/mml/v4/msubsup.rb +0 -1
- data/lib/mml/v4/msup.rb +0 -1
- data/lib/mml/v4/mtable.rb +0 -1
- data/lib/mml/v4/mtd.rb +0 -1
- data/lib/mml/v4/mtext.rb +1 -1
- data/lib/mml/v4/mtr.rb +0 -1
- data/lib/mml/v4/munder.rb +0 -1
- data/lib/mml/v4/munderover.rb +0 -1
- data/lib/mml/v4/none.rb +0 -1
- data/lib/mml/v4/relations.rb +37 -0
- data/lib/mml/v4/semantics.rb +0 -1
- data/lib/mml/v4/sets.rb +57 -0
- data/lib/mml/v4/statistics.rb +33 -0
- data/lib/mml/v4/tendsto.rb +9 -0
- data/lib/mml/v4/vector_calculus.rb +21 -0
- data/lib/mml/v4.rb +421 -44
- data/lib/mml/version.rb +1 -1
- data/lib/mml/versioned_parser.rb +1 -1
- data/lib/mml.rb +3 -1
- data/reference-docs/mathml-source/pubtext/mathmlspec.dtd +150 -0
- data/reference-docs/mathml-source/pubtext/xmlspec.dtd +2649 -0
- data/reference-docs/mathml-source/readme.txt +40 -0
- data/reference-docs/mathml-source/run +296 -0
- data/reference-docs/mathml-source/style/html/html2xhtml.xsl +216 -0
- data/reference-docs/mathml-source/style/html/images.xsl +98 -0
- data/reference-docs/mathml-source/style/html/mml6.xsl +1156 -0
- data/reference-docs/mathml-source/style/html/mmldiff.xsl +566 -0
- data/reference-docs/mathml-source/style/html/mmlspec.xsl +2531 -0
- data/reference-docs/mathml-source/style/html/slices-common.xsl +312 -0
- data/reference-docs/mathml-source/style/html/slices.xsl +48 -0
- data/reference-docs/mathml-source/style/html/xmlspec.xsl +2542 -0
- data/reference-docs/mathml-source/style/pdf/mathmlspec.xsl +2510 -0
- data/reference-docs/mathml-source/xml/changes.xml +773 -0
- data/reference-docs/mathml-source/xml/character-set.xml +1011 -0
- data/reference-docs/mathml-source/xml/content-element-def.xml +6143 -0
- data/reference-docs/mathml-source/xml/content-markup.xml +8178 -0
- data/reference-docs/mathml-source/xml/contributors.xml +425 -0
- data/reference-docs/mathml-source/xml/dom-bindings.xml +20 -0
- data/reference-docs/mathml-source/xml/dom-intro.xml +114 -0
- data/reference-docs/mathml-source/xml/fundamentals.xml +1646 -0
- data/reference-docs/mathml-source/xml/glossary.xml +519 -0
- data/reference-docs/mathml-source/xml/interface.xml +1096 -0
- data/reference-docs/mathml-source/xml/introduction.xml +724 -0
- data/reference-docs/mathml-source/xml/mathml-css-sample.xml +304 -0
- data/reference-docs/mathml-source/xml/mathml-dom.xml +3813 -0
- data/reference-docs/mathml-source/xml/mathml-spec.xml +356 -0
- data/reference-docs/mathml-source/xml/mixing.xml +982 -0
- data/reference-docs/mathml-source/xml/operator-dict.xml +551 -0
- data/reference-docs/mathml-source/xml/parsing.xml +2565 -0
- data/reference-docs/mathml-source/xml/presentation-markup.xml +6834 -0
- data/reference-docs/mathml-source/xml/references.xml +323 -0
- data/reference-docs/mathml-source/xml/validation-grammar.xml +877 -0
- data/schemas/README.adoc +17 -0
- data/schemas/mathml2/common/common-attribs.xsd +41 -0
- data/schemas/mathml2/common/math.xsd +126 -0
- data/schemas/mathml2/common/xlink-href.xsd +20 -0
- data/schemas/mathml2/content/CVS/Entries +16 -0
- data/schemas/mathml2/content/CVS/Repository +1 -0
- data/schemas/mathml2/content/CVS/Root +1 -0
- data/schemas/mathml2/content/arith.xsd +90 -0
- data/schemas/mathml2/content/calculus.xsd +146 -0
- data/schemas/mathml2/content/common-attrib.xsd +30 -0
- data/schemas/mathml2/content/constants.xsd +83 -0
- data/schemas/mathml2/content/constructs.xsd +260 -0
- data/schemas/mathml2/content/elementary-functions.xsd +117 -0
- data/schemas/mathml2/content/functions.xsd +73 -0
- data/schemas/mathml2/content/linear-algebra.xsd +173 -0
- data/schemas/mathml2/content/logic.xsd +53 -0
- data/schemas/mathml2/content/relations.xsd +55 -0
- data/schemas/mathml2/content/semantics.xsd +85 -0
- data/schemas/mathml2/content/sets.xsd +236 -0
- data/schemas/mathml2/content/statistics.xsd +136 -0
- data/schemas/mathml2/content/tokens.xsd +120 -0
- data/schemas/mathml2/content/tokens.xsd.~1.3.~ +119 -0
- data/schemas/mathml2/content/vector-calculus.xsd +88 -0
- data/schemas/mathml2/mathml2.xsd +59 -0
- data/schemas/mathml2/presentation/action.xsd +44 -0
- data/schemas/mathml2/presentation/characters.xsd +37 -0
- data/schemas/mathml2/presentation/common-attribs.xsd +113 -0
- data/schemas/mathml2/presentation/common-types.xsd +103 -0
- data/schemas/mathml2/presentation/error.xsd +40 -0
- data/schemas/mathml2/presentation/layout.xsd +195 -0
- data/schemas/mathml2/presentation/scripts.xsd +186 -0
- data/schemas/mathml2/presentation/space.xsd +52 -0
- data/schemas/mathml2/presentation/style.xsd +69 -0
- data/schemas/mathml2/presentation/table.xsd +216 -0
- data/schemas/mathml2/presentation/tokens.xsd +124 -0
- data/schemas/mathml3/mathml3-common.xsd +99 -0
- data/schemas/mathml3/mathml3-content.xsd +684 -0
- data/schemas/mathml3/mathml3-presentation.xsd +2151 -0
- data/schemas/mathml3/mathml3-strict-content.xsd +186 -0
- data/schemas/mathml3/mathml3.xsd +9 -0
- data/schemas/mathml4/mathml4-content.rnc +382 -0
- data/schemas/mathml4/mathml4-core.rnc +361 -0
- data/schemas/mathml4/mathml4-presentation.rnc +358 -0
- data/schemas/mathml4/mathml4-strict-content.rnc +86 -0
- data/schemas/mathml4/mathml4.rnc +21 -0
- data/schemas/mathml4/mathml4.rnc.1 +21 -0
- data/schemas/mathml4/mathml4.rng +37 -0
- metadata +249 -2
|
@@ -0,0 +1,2510 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
|
2
|
+
|
|
3
|
+
<!--
|
|
4
|
+
$Id: mathmlspec.xsl,v 1.69 2003/10/20 19:03:25 davidc Exp $
|
|
5
|
+
This style-sheet creates the LaTeX version of the MathML Recommendation,
|
|
6
|
+
which is used to create a PDF document.
|
|
7
|
+
It is maintained by David Carlisle for the Math WG.
|
|
8
|
+
-->
|
|
9
|
+
|
|
10
|
+
<xsl:stylesheet
|
|
11
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
12
|
+
version="1.0"
|
|
13
|
+
xmlns:saxon="http://icl.com/saxon"
|
|
14
|
+
extension-element-prefixes="saxon">
|
|
15
|
+
|
|
16
|
+
<xsl:key name="id" match="*[@id]" use="@id"/>
|
|
17
|
+
|
|
18
|
+
<xsl:output method="text"
|
|
19
|
+
encoding="ISO-8859-1"/>
|
|
20
|
+
|
|
21
|
+
<!--
|
|
22
|
+
The following parameters determine
|
|
23
|
+
- the type of document
|
|
24
|
+
- copyright dates
|
|
25
|
+
All parameters can be overridden by the user.
|
|
26
|
+
-->
|
|
27
|
+
|
|
28
|
+
<xsl:param name="status" select="/spec/@w3c-doctype"/>
|
|
29
|
+
<xsl:param name="copyright">1998-2003</xsl:param>
|
|
30
|
+
|
|
31
|
+
<!-- Main output document -->
|
|
32
|
+
<xsl:template match="/">
|
|
33
|
+
<saxon:output href="{substring-before(/spec/header/altlocs/loc
|
|
34
|
+
[contains(@href,'s.pdf')]/@href,'pdf')}tex">
|
|
35
|
+
<xsl:text>
|
|
36
|
+
\documentclass[oneside,fleqn,12pt]{rapport3}
|
|
37
|
+
\usepackage{ae,pslatex,longtable}
|
|
38
|
+
\usepackage{verbatim,amssymb,url}
|
|
39
|
+
\usepackage[latin1]{inputenc}
|
|
40
|
+
\DeclareInputMath{215}{\ensuremath\times}
|
|
41
|
+
|
|
42
|
+
\makeatletter
|
|
43
|
+
|
|
44
|
+
\newenvironment{htable}
|
|
45
|
+
{\par\def\@captype{table}}{\par}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
\def\DomMethodName#1{\colorbox[RGB]{"F9, "F5, "C0}{#1}}
|
|
49
|
+
\def\DomAttName#1{\colorbox[RGB]{"C0, "C0, "F9}{#1}}
|
|
50
|
+
|
|
51
|
+
\usepackage[pdftex]{color,graphicx}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
\hoffset-1in
|
|
55
|
+
\voffset-1in
|
|
56
|
+
|
|
57
|
+
\newcount\vcount
|
|
58
|
+
\def\verbatim@processline{%
|
|
59
|
+
\ifcat$\the\verbatim@line$%
|
|
60
|
+
\ifnum\vcount=\z@\verbatim@line{\@gobble}\fi
|
|
61
|
+
\penalty0 \fi
|
|
62
|
+
\advance\vcount\@ne
|
|
63
|
+
\ifnum\vcount>25 \penalty0 \fi
|
|
64
|
+
\the\verbatim@line\par}
|
|
65
|
+
|
|
66
|
+
\HeadingFonts
|
|
67
|
+
{\leavevmode\color[RGB]{"0,"50,"B2}\sffamily}
|
|
68
|
+
{\leavevmode\color[RGB]{"0,"50,"B2}\sffamily}
|
|
69
|
+
{\leavevmode\color[RGB]{"0,"50,"B2}\sffamily}
|
|
70
|
+
{\leavevmode\color[RGB]{"0,"50,"B2}\sffamily}
|
|
71
|
+
{\leavevmode\color[RGB]{"0,"50,"B2}\sffamily}
|
|
72
|
+
{\leavevmode\color[RGB]{"0,"50,"B2}\sffamily}
|
|
73
|
+
{\leavevmode\color[RGB]{"0,"50,"B2}\sffamily}
|
|
74
|
+
{\leavevmode\color[RGB]{"0,"50,"B2}\sffamily}
|
|
75
|
+
|
|
76
|
+
\def\@oddhead{\hfill \thepage}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
\setlength\textheight{22cm}
|
|
81
|
+
\setlength\textwidth{25cm}
|
|
82
|
+
|
|
83
|
+
\paperheight\textheight
|
|
84
|
+
\paperwidth\textwidth
|
|
85
|
+
|
|
86
|
+
\oddsidemargin30pt
|
|
87
|
+
\topmargin10pt
|
|
88
|
+
|
|
89
|
+
\advance\textwidth-2\oddsidemargin
|
|
90
|
+
\advance\textheight-6\topmargin
|
|
91
|
+
\hbadness10000
|
|
92
|
+
\hfuzz40pt
|
|
93
|
+
\interlinepenalty\@M
|
|
94
|
+
\interdisplaylinepenalty\@M
|
|
95
|
+
|
|
96
|
+
\raggedbottom
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
\def\familydefault{phv}
|
|
100
|
+
\def\ttdefault{aett}
|
|
101
|
+
|
|
102
|
+
\newenvironment{landscape}
|
|
103
|
+
{\par}{}
|
|
104
|
+
|
|
105
|
+
\usepackage{tabularx,hyperref}
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
\def\titlecode{%
|
|
109
|
+
\color[RGB]{"0,"50,"B2}
|
|
110
|
+
|
|
111
|
+
\hspace*{-1cm}\rotatebox[origin=bl]{90}{\normalsize\colorbox[RGB]{"0,"50,"B2}{\color
|
|
112
|
+
{white}W3C </xsl:text>
|
|
113
|
+
<xsl:choose>
|
|
114
|
+
<xsl:when test="$status='REC' or $status='rec'">
|
|
115
|
+
<xsl:text>Recommendation</xsl:text>
|
|
116
|
+
</xsl:when>
|
|
117
|
+
<xsl:when test="$status='CR' or $status='cr'">
|
|
118
|
+
<xsl:text>Candidiate Recommendation</xsl:text>
|
|
119
|
+
</xsl:when>
|
|
120
|
+
<xsl:when test="$status='PR' or $status='pr'">
|
|
121
|
+
<xsl:text>Proposed Recommendation</xsl:text>
|
|
122
|
+
</xsl:when>
|
|
123
|
+
<xsl:when test="$status='PER' or $status='per'">
|
|
124
|
+
<xsl:text>Proposed Edited Recommendation</xsl:text>
|
|
125
|
+
</xsl:when>
|
|
126
|
+
<xsl:otherwise>
|
|
127
|
+
<xsl:text>Working Draft</xsl:text>
|
|
128
|
+
</xsl:otherwise>
|
|
129
|
+
</xsl:choose>
|
|
130
|
+
<xsl:text>\qquad}\hspace{-2cm}}\hspace{1cm}
|
|
131
|
+
\href{http://www.w3.org}{\includegraphics{w3c_home.png}}\par
|
|
132
|
+
|
|
133
|
+
\bigskip
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
\def\opdict{\let\verbatim\oldv\tiny}
|
|
137
|
+
\def\endopdict{\par}
|
|
138
|
+
|
|
139
|
+
\input{mathml-spec.tex}
|
|
140
|
+
</xsl:text>
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
</saxon:output>
|
|
144
|
+
<saxon:output href="{substring-before(/spec/header/altlocs/loc
|
|
145
|
+
[contains(@href,'p.pdf')]/@href,'pdf')}tex">
|
|
146
|
+
<xsl:text>
|
|
147
|
+
\documentclass[twoside,fleqn,11pt]{rapport3}
|
|
148
|
+
\hoffset-1in
|
|
149
|
+
\addtolength\textwidth{1.7in}
|
|
150
|
+
\oddsidemargin=\paperwidth
|
|
151
|
+
\advance\oddsidemargin-\textwidth
|
|
152
|
+
\divide\oddsidemargin by 2
|
|
153
|
+
\evensidemargin=\oddsidemargin
|
|
154
|
+
|
|
155
|
+
\addtolength\topmargin{-3\baselineskip}
|
|
156
|
+
\addtolength\textheight{6\baselineskip}
|
|
157
|
+
\usepackage{ae}
|
|
158
|
+
\usepackage{verbatim,amssymb,longtable,url}
|
|
159
|
+
\usepackage[latin1]{inputenc}
|
|
160
|
+
\DeclareInputMath{215}{\ensuremath\times}
|
|
161
|
+
|
|
162
|
+
\usepackage[pdftex]{graphicx,color}
|
|
163
|
+
\usepackage{pslatex,tabularx,lscape}
|
|
164
|
+
\renewcommand\ttdefault{aett}
|
|
165
|
+
\usepackage{hyperref}
|
|
166
|
+
|
|
167
|
+
\definecolor{Blue}{rgb}{0,0,.3}
|
|
168
|
+
\hypersetup{
|
|
169
|
+
linkcolor=Blue,
|
|
170
|
+
anchorcolor=black,
|
|
171
|
+
citecolor=Blue,
|
|
172
|
+
filecolor=Blue,
|
|
173
|
+
urlcolor=Blue,
|
|
174
|
+
menucolor=Blue,
|
|
175
|
+
pagecolor=Blue,
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
\def\titlecode{}
|
|
179
|
+
\makeatletter
|
|
180
|
+
|
|
181
|
+
\newenvironment{htable}
|
|
182
|
+
{\par\def\@captype{table}}{\par}
|
|
183
|
+
|
|
184
|
+
\def\DomMethodName#1{\fcolorbox[RGB]{"F9, "F5, "C0}{"FF, "FF, "FF}{#1}}
|
|
185
|
+
\def\DomAttName#1{\fcolorbox[RGB]{"C0, "C0, "F9}{"FF, "FF, "FF}{#1}}
|
|
186
|
+
|
|
187
|
+
\def\opdict{\begin{landscape}\hfuzz=70pt\vbadness\maxdimen\small}
|
|
188
|
+
\def\endopdict{\end{landscape}}
|
|
189
|
+
|
|
190
|
+
\hfuzz=10pt
|
|
191
|
+
\vfuzz=10pt
|
|
192
|
+
\hbadness=2000
|
|
193
|
+
\vbadness=\maxdimen
|
|
194
|
+
|
|
195
|
+
\input{mathml-spec.tex}
|
|
196
|
+
|
|
197
|
+
</xsl:text>
|
|
198
|
+
</saxon:output>
|
|
199
|
+
|
|
200
|
+
<xsl:variable name="x">
|
|
201
|
+
<xsl:apply-templates mode="diff"/>
|
|
202
|
+
</xsl:variable>
|
|
203
|
+
<saxon:output href="mathml-spec.tex">
|
|
204
|
+
<xsl:apply-templates select="saxon:node-set($x)/node()"/>
|
|
205
|
+
</saxon:output>
|
|
206
|
+
</xsl:template>
|
|
207
|
+
|
|
208
|
+
<xsl:template match="*[@diff='del']" mode="diff" priority="10"/>
|
|
209
|
+
<xsl:template match="node()" mode="diff">
|
|
210
|
+
<xsl:copy>
|
|
211
|
+
<xsl:copy-of select="@*"/>
|
|
212
|
+
<xsl:apply-templates mode="diff"/>
|
|
213
|
+
</xsl:copy>
|
|
214
|
+
</xsl:template>
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
<!-- Basic framework for the MathML specification (as in the XML spec) -->
|
|
218
|
+
<xsl:template match="spec">
|
|
219
|
+
<xsl:text>
|
|
220
|
+
\righthyphenmin=2
|
|
221
|
+
\hyphenation{new-dec-laration val-ue}
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
\def\egemph#1\relax{\emph{#1}}
|
|
225
|
+
\newcounter{dtdlink}
|
|
226
|
+
\newcounter{prod}
|
|
227
|
+
\def\eglabel*#1*{\refstepcounter{dtdlink}\label{#1}}
|
|
228
|
+
\def\eghyperref[#1]*#2*{\hyperref[#1]{#2}}
|
|
229
|
+
|
|
230
|
+
\hypersetup{colorlinks,pdftitle={MathML 2.0 WD},
|
|
231
|
+
pdfsubject={MathML},
|
|
232
|
+
pdfauthor={Math WG},
|
|
233
|
+
pdfkeywords={pdf, LaTeX, MathML},
|
|
234
|
+
bookmarks=true,
|
|
235
|
+
pdfpagemode=UseOutlines,
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
\def\HyPsd@CatcodeWarning#1{}
|
|
239
|
+
\newcolumntype{L}{>{\raggedright\let\\\tabularnewline}X}
|
|
240
|
+
|
|
241
|
+
\def\strc[#1]#2{\texttt{\leavevmode\penalty\z@\hskip 0pt plus #1\penalty1000\hskip 0pt plus -#1\relax#2}}
|
|
242
|
+
|
|
243
|
+
\def\1{\ \hfil\penalty1000\hfilneg}
|
|
244
|
+
|
|
245
|
+
\renewenvironment{thebibliography}[1]
|
|
246
|
+
{\list{\@biblabel{\@arabic\c@enumiv}}%
|
|
247
|
+
{\settowidth\labelwidth{\@biblabel{#1}}%
|
|
248
|
+
\leftmargin\labelwidth
|
|
249
|
+
\advance\leftmargin\labelsep
|
|
250
|
+
\itemsep.25\baselineskip plus.25\baselineskip
|
|
251
|
+
\@openbib@code
|
|
252
|
+
\usecounter{enumiv}%
|
|
253
|
+
\let\p@enumiv\@empty
|
|
254
|
+
\renewcommand*\theenumiv{\@arabic\c@enumiv}}%
|
|
255
|
+
\sloppy\clubpenalty4000\widowpenalty4000%
|
|
256
|
+
\sfcode`\.\@m}
|
|
257
|
+
{\def\@noitemerr
|
|
258
|
+
{\@latex@warning{Empty `thebibliography' environment}}%
|
|
259
|
+
\endlist}
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
\let\oldv\verbatim
|
|
263
|
+
{\catcode`\-\active\gdef\verbatim{\oldv\@makeother\-}}
|
|
264
|
+
|
|
265
|
+
\begin{document}
|
|
266
|
+
\let\tablecell&
|
|
267
|
+
\def\resetcodes{%
|
|
268
|
+
\catcode`\\=0
|
|
269
|
+
\catcode`\&=4
|
|
270
|
+
\catcode`\^=7
|
|
271
|
+
\catcode`\_=8
|
|
272
|
+
}
|
|
273
|
+
\setcounter{secnumdepth}{3}
|
|
274
|
+
\renewcommand*\paragraph{%
|
|
275
|
+
\@startsection{subsubsection}{4}{\z@}%
|
|
276
|
+
{-1\baselineskip plus -.5\baselineskip minus -.25\baselineskip}%
|
|
277
|
+
{.01\baselineskip}%
|
|
278
|
+
{\normalfont\normalsize\ParaFont}}
|
|
279
|
+
|
|
280
|
+
\def\gobbleTX T#1X{#1}
|
|
281
|
+
\expandafter\def\expandafter\TTeX\expandafter{\expandafter\gobbleTX \TeX}
|
|
282
|
+
\let\oldmath\(
|
|
283
|
+
\def\({\oldmath\resetcodes }
|
|
284
|
+
\let\olddmath\[
|
|
285
|
+
\def\[{\olddmath\resetcodes }
|
|
286
|
+
\renewcommand{\int}{\intop}
|
|
287
|
+
\newcommand{\true}{{\small\texttt{true}}}
|
|
288
|
+
\newcommand{\false}{{\small\texttt{false}}}
|
|
289
|
+
\newcommand{\Y}{$\surd$}
|
|
290
|
+
\newcommand{\N}{--}
|
|
291
|
+
\newcommand{\xor}{\mathbin{\mathrm{xor}}}
|
|
292
|
+
\newcommand{\mod}{\mathbin{\mathrm{mod}}}
|
|
293
|
+
\newcommand{\diffd}{\mathrm{d}}
|
|
294
|
+
\newcommand{\eulere}{\mathrm{e}}
|
|
295
|
+
\newcommand{\ii}{\mathrm{i}}
|
|
296
|
+
\newcommand{\OR}{$\;\mid\;$}
|
|
297
|
+
\newcommand{\versus}{\quad\mathrm{vs}\quad}
|
|
298
|
+
\newdimen\boxwd
|
|
299
|
+
\newcommand{\widearrow}[1]{%
|
|
300
|
+
\setbox0=\hbox{$\mathsurround0pt \scriptstyle\;\;#1\;\;$}\boxwd=\wd0%
|
|
301
|
+
\mathrel{\mathop{\hbox to\boxwd{\rightarrowfill}}\limits_{#1}}}
|
|
302
|
+
\def\backepsilon{\ni}
|
|
303
|
+
\catcode`\&=12
|
|
304
|
+
\catcode`\%=12
|
|
305
|
+
\catcode`\#=12
|
|
306
|
+
\catcode`\_=12
|
|
307
|
+
\catcode`\^^M=10
|
|
308
|
+
\catcode`\^^a3=0
|
|
309
|
+
\catcode`\^^a1=\active
|
|
310
|
+
\catcode`\^^a2=\active
|
|
311
|
+
\catcode`\^^a4=\active
|
|
312
|
+
\def^^a1{-\linebreak[0]}
|
|
313
|
+
\def^^a2{=\linebreak[0]}
|
|
314
|
+
\def^^a4{/\linebreak[0]}
|
|
315
|
+
\catcode`\^=12
|
|
316
|
+
\catcode`\\=12
|
|
317
|
+
�thispagestyle{empty}
|
|
318
|
+
</xsl:text>
|
|
319
|
+
<xsl:apply-templates/>
|
|
320
|
+
<xsl:text>�catcode`�\=0 �catcode`�_=8
|
|
321
|
+
\end{document}</xsl:text>
|
|
322
|
+
</xsl:template>
|
|
323
|
+
|
|
324
|
+
<!-- Prologue -->
|
|
325
|
+
|
|
326
|
+
<xsl:template match="header">
|
|
327
|
+
<!-- document title -->
|
|
328
|
+
<xsl:text>{�Large�bfseries�titlecode
</xsl:text>
|
|
329
|
+
<xsl:value-of select="title"/>
|
|
330
|
+
<!-- document subtitle -->
|
|
331
|
+
<xsl:text>�par

</xsl:text>
|
|
332
|
+
<xsl:text>�bigskip
</xsl:text>
|
|
333
|
+
<xsl:text>�currentpdfbookmark{Mathematical Markup Language Specification}{}
</xsl:text>
|
|
334
|
+
<xsl:text>�large </xsl:text>
|
|
335
|
+
<xsl:value-of select="w3c-doctype"/>
|
|
336
|
+
<xsl:text> </xsl:text>
|
|
337
|
+
<xsl:value-of select="pubdate/day"/>
|
|
338
|
+
<xsl:text> </xsl:text>
|
|
339
|
+
<xsl:value-of select="pubdate/month"/>
|
|
340
|
+
<xsl:text> </xsl:text>
|
|
341
|
+
<xsl:value-of select="pubdate/year"/>
|
|
342
|
+
<xsl:text>�par
�smallskip}
</xsl:text>
|
|
343
|
+
<xsl:text>�begin{description}
</xsl:text>
|
|
344
|
+
<xsl:apply-templates select="publoc"/>
|
|
345
|
+
<xsl:apply-templates select="latestloc"/>
|
|
346
|
+
<xsl:apply-templates select="prevlocs"/>
|
|
347
|
+
<xsl:apply-templates select="authlist"/>
|
|
348
|
+
<xsl:text>�end{description}
</xsl:text>
|
|
349
|
+
<xsl:apply-templates select="errataloc"/>
|
|
350
|
+
<xsl:apply-templates select="altlocs"/>
|
|
351
|
+
<xsl:apply-templates select="translationloc"/>
|
|
352
|
+
<xsl:call-template name="copyright"/>
|
|
353
|
+
<xsl:apply-templates select="abstract"/>
|
|
354
|
+
<xsl:apply-templates select="status"/>
|
|
355
|
+
</xsl:template>
|
|
356
|
+
|
|
357
|
+
<xsl:template match="publoc">
|
|
358
|
+
<xsl:text>
�item[This version:]</xsl:text>
|
|
359
|
+
<xsl:apply-templates select="loc[not(@role='available-format')]"/>
|
|
360
|
+
<xsl:apply-templates select="loc[@role='available-format']"/>
|
|
361
|
+
</xsl:template>
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
<xsl:template match="loc[@role='available-format']" priority="3">
|
|
365
|
+
<xsl:if test="position()=1">
|
|
366
|
+
<xsl:text>�\
Also available as: </xsl:text>
|
|
367
|
+
</xsl:if>
|
|
368
|
+
<xsl:text>�href{</xsl:text>
|
|
369
|
+
<xsl:value-of select="@href"/>
|
|
370
|
+
<xsl:text>}{</xsl:text>
|
|
371
|
+
<xsl:apply-templates/>
|
|
372
|
+
<xsl:text>}</xsl:text>
|
|
373
|
+
<xsl:if test="position() != last()">
|
|
374
|
+
<xsl:text>, </xsl:text>
|
|
375
|
+
</xsl:if>
|
|
376
|
+
</xsl:template>
|
|
377
|
+
|
|
378
|
+
<xsl:template match="latestloc">
|
|
379
|
+
<xsl:text>
�item[Latest MathML 2 version:]</xsl:text>
|
|
380
|
+
<xsl:apply-templates/>
|
|
381
|
+
</xsl:template>
|
|
382
|
+
|
|
383
|
+
<xsl:template match="latestloc[@role='rec']">
|
|
384
|
+
<xsl:text>
�item[Latest MathML Recommendation:]</xsl:text>
|
|
385
|
+
<xsl:apply-templates/>
|
|
386
|
+
</xsl:template>
|
|
387
|
+
|
|
388
|
+
<xsl:template match="prevlocs">
|
|
389
|
+
<xsl:text>
�item[Previous version</xsl:text><xsl:if
|
|
390
|
+
test="count(loc) > 1">s</xsl:if><xsl:text>:]�mbox{}</xsl:text>
|
|
391
|
+
<xsl:apply-templates/>
|
|
392
|
+
</xsl:template>
|
|
393
|
+
|
|
394
|
+
<xsl:template match="publoc/loc|latestloc/loc|prevlocs/loc">
|
|
395
|
+
<xsl:text>�par�href{</xsl:text>
|
|
396
|
+
<xsl:value-of select="@href"/>
|
|
397
|
+
<xsl:text>}{</xsl:text>
|
|
398
|
+
<xsl:apply-templates/>
|
|
399
|
+
<xsl:text>}</xsl:text>
|
|
400
|
+
</xsl:template>
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
<xsl:template match="errataloc">
|
|
404
|
+
�par Please refer to the errata for this document,
|
|
405
|
+
<xsl:apply-templates select="loc"/>,
|
|
406
|
+
which may include some normative corrections.�par
|
|
407
|
+
</xsl:template>
|
|
408
|
+
|
|
409
|
+
<xsl:template match="translationloc">
|
|
410
|
+
�par See also
|
|
411
|
+
<xsl:apply-templates select="loc"/>,
|
|
412
|
+
for �textbf{translations} of this document.�par
|
|
413
|
+
</xsl:template>
|
|
414
|
+
|
|
415
|
+
<xsl:template match="altlocs">
|
|
416
|
+
<xsl:text>
�par
|
|
417
|
+
In addition to the �href{overview.html}{HTML} version,
|
|
418
|
+
this document is also available
|
|
419
|
+
in these non-normative formats: </xsl:text>
|
|
420
|
+
<xsl:for-each select="loc">
|
|
421
|
+
<xsl:if test="position() > 1">
|
|
422
|
+
<xsl:if test="last() > 2">
|
|
423
|
+
<xsl:text>, </xsl:text>
|
|
424
|
+
</xsl:if>
|
|
425
|
+
<xsl:if test="last() = 2">
|
|
426
|
+
<xsl:text> </xsl:text>
|
|
427
|
+
</xsl:if>
|
|
428
|
+
</xsl:if>
|
|
429
|
+
<xsl:if test="position() = last() and position() > 1">and </xsl:if>
|
|
430
|
+
<xsl:text/>�href{<xsl:value-of select="@href"/>}{<xsl:apply-templates/>}<xsl:text/>
|
|
431
|
+
</xsl:for-each>
|
|
432
|
+
<xsl:text>.�par
|
|
433
|
+
</xsl:text>
|
|
434
|
+
</xsl:template>
|
|
435
|
+
|
|
436
|
+
<xsl:template match="authlist">
|
|
437
|
+
<xsl:text>
�item[Editor</xsl:text>
|
|
438
|
+
<xsl:if test="count(author[@role='editor']) > 1">s</xsl:if>
|
|
439
|
+
<xsl:text>:]</xsl:text>
|
|
440
|
+
<xsl:apply-templates select="author[@role='editor']" mode="editor"/>
|
|
441
|
+
<xsl:if test="author[not(@role='@editor')]">
|
|
442
|
+
<xsl:text>
�item[Principal Authors:]</xsl:text>
|
|
443
|
+
<xsl:apply-templates select="author"/>
|
|
444
|
+
</xsl:if>
|
|
445
|
+
</xsl:template>
|
|
446
|
+
|
|
447
|
+
<xsl:template match="author[@role='editor']" mode="editor">
|
|
448
|
+
<xsl:apply-templates/>
|
|
449
|
+
<xsl:if test="position() != last()">�\</xsl:if>
|
|
450
|
+
</xsl:template>
|
|
451
|
+
|
|
452
|
+
<xsl:template match="author">
|
|
453
|
+
<xsl:value-of select="translate(normalize-space(name),' ','~')"/>
|
|
454
|
+
<xsl:if test="position() != last()">, </xsl:if>
|
|
455
|
+
</xsl:template>
|
|
456
|
+
|
|
457
|
+
<xsl:template match="name">
|
|
458
|
+
<xsl:apply-templates/>
|
|
459
|
+
</xsl:template>
|
|
460
|
+
|
|
461
|
+
<xsl:template match="author/affiliation">
|
|
462
|
+
<xsl:text>(</xsl:text>
|
|
463
|
+
<xsl:apply-templates/>
|
|
464
|
+
<xsl:text>)</xsl:text>
|
|
465
|
+
</xsl:template>
|
|
466
|
+
|
|
467
|
+
<xsl:template match="author/email">
|
|
468
|
+
<xsl:text>�(�langle�)</xsl:text>
|
|
469
|
+
<xsl:apply-templates/>
|
|
470
|
+
<xsl:text>�(�rangle$))</xsl:text>
|
|
471
|
+
</xsl:template>
|
|
472
|
+
|
|
473
|
+
<xsl:template match="abstract">
|
|
474
|
+
<xsl:text>�paragraph*{Abstract}�label{abstract}</xsl:text>
|
|
475
|
+
<xsl:apply-templates/>
|
|
476
|
+
</xsl:template>
|
|
477
|
+
|
|
478
|
+
<xsl:template match="status">
|
|
479
|
+
<xsl:text>�paragraph*{Status of this document}�label{status}</xsl:text>
|
|
480
|
+
<xsl:apply-templates/>
|
|
481
|
+
</xsl:template>
|
|
482
|
+
|
|
483
|
+
<xsl:template match="w3c-designation">
|
|
484
|
+
</xsl:template>
|
|
485
|
+
|
|
486
|
+
<xsl:template match="w3c-doctype">
|
|
487
|
+
</xsl:template>
|
|
488
|
+
|
|
489
|
+
<xsl:template match="header/pubdate">
|
|
490
|
+
</xsl:template>
|
|
491
|
+
|
|
492
|
+
<xsl:template match="spec/header/title">
|
|
493
|
+
</xsl:template>
|
|
494
|
+
|
|
495
|
+
<xsl:template match="revisiondesc">
|
|
496
|
+
</xsl:template>
|
|
497
|
+
|
|
498
|
+
<xsl:template match="pubstmt">
|
|
499
|
+
</xsl:template>
|
|
500
|
+
|
|
501
|
+
<xsl:template match="sourcedesc">
|
|
502
|
+
</xsl:template>
|
|
503
|
+
|
|
504
|
+
<xsl:template match="langusage">
|
|
505
|
+
</xsl:template>
|
|
506
|
+
|
|
507
|
+
<xsl:template match="version">
|
|
508
|
+
</xsl:template>
|
|
509
|
+
|
|
510
|
+
<!-- Body -->
|
|
511
|
+
|
|
512
|
+
<xsl:template match="front">
|
|
513
|
+
<xsl:apply-templates/>
|
|
514
|
+
</xsl:template>
|
|
515
|
+
|
|
516
|
+
<xsl:template match="body">
|
|
517
|
+
<xsl:text>{�catcode`\=0 �tableofcontents}</xsl:text>
|
|
518
|
+
<xsl:apply-templates/>
|
|
519
|
+
</xsl:template>
|
|
520
|
+
|
|
521
|
+
<xsl:template match="back">
|
|
522
|
+
<xsl:text>�appendix </xsl:text>
|
|
523
|
+
<xsl:apply-templates/>
|
|
524
|
+
</xsl:template>
|
|
525
|
+
|
|
526
|
+
<xsl:template match="div1|inform-div1">
|
|
527
|
+
<xsl:text>�chapter{</xsl:text>
|
|
528
|
+
<xsl:apply-templates select="head" mode="header"/>
|
|
529
|
+
<xsl:if test="name(.)='inform-div1'"> (Non-Normative)</xsl:if>
|
|
530
|
+
<xsl:call-template name="makeanchor"/>
|
|
531
|
+
<xsl:text>}</xsl:text>
|
|
532
|
+
<xsl:apply-templates/>
|
|
533
|
+
</xsl:template>
|
|
534
|
+
|
|
535
|
+
<xsl:template match="div2">
|
|
536
|
+
<xsl:text>�section{</xsl:text>
|
|
537
|
+
<xsl:apply-templates select="head" mode="header"/>
|
|
538
|
+
<xsl:call-template name="makeanchor"/>
|
|
539
|
+
<xsl:text>}</xsl:text>
|
|
540
|
+
<xsl:apply-templates/>
|
|
541
|
+
</xsl:template>
|
|
542
|
+
|
|
543
|
+
<xsl:template match="div2[@id='oper-dict_entries']">
|
|
544
|
+
<xsl:text>�section{</xsl:text>
|
|
545
|
+
<xsl:apply-templates select="head" mode="header"/>
|
|
546
|
+
<xsl:call-template name="makeanchor"/>
|
|
547
|
+
<xsl:text>}</xsl:text>
|
|
548
|
+
<xsl:text>�begin{opdict} </xsl:text>
|
|
549
|
+
<xsl:apply-templates/>
|
|
550
|
+
<xsl:text> �end{opdict} </xsl:text>
|
|
551
|
+
</xsl:template>
|
|
552
|
+
|
|
553
|
+
<xsl:template match="div3">
|
|
554
|
+
<xsl:text>�subsection{</xsl:text>
|
|
555
|
+
<xsl:apply-templates select="head" mode="header"/>
|
|
556
|
+
<xsl:call-template name="makeanchor"/>
|
|
557
|
+
<xsl:text>}</xsl:text>
|
|
558
|
+
<xsl:apply-templates/>
|
|
559
|
+
</xsl:template>
|
|
560
|
+
|
|
561
|
+
<xsl:template match="div4">
|
|
562
|
+
<xsl:text>�subsubsection{</xsl:text>
|
|
563
|
+
<xsl:apply-templates select="head" mode="header"/>
|
|
564
|
+
<xsl:call-template name="makeanchor"/>
|
|
565
|
+
<xsl:text>}</xsl:text>
|
|
566
|
+
<xsl:apply-templates/>
|
|
567
|
+
</xsl:template>
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
<xsl:template match="div5">
|
|
571
|
+
<xsl:text>�paragraph{</xsl:text>
|
|
572
|
+
<xsl:apply-templates select="head" mode="header"/>
|
|
573
|
+
<xsl:call-template name="makeanchor"/>
|
|
574
|
+
<xsl:text>}</xsl:text>
|
|
575
|
+
<xsl:apply-templates/>
|
|
576
|
+
</xsl:template>
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
<xsl:template match="head" priority="1">
|
|
580
|
+
</xsl:template>
|
|
581
|
+
|
|
582
|
+
<xsl:template match="head" mode="header">
|
|
583
|
+
<xsl:apply-templates/>
|
|
584
|
+
</xsl:template>
|
|
585
|
+
|
|
586
|
+
<!-- Blocks -->
|
|
587
|
+
<xsl:template match="item/p" priority="1">
|
|
588
|
+
<xsl:apply-templates/>
|
|
589
|
+
</xsl:template>
|
|
590
|
+
|
|
591
|
+
<xsl:template match="def/p" priority="1">
|
|
592
|
+
<xsl:apply-templates/>
|
|
593
|
+
</xsl:template>
|
|
594
|
+
|
|
595
|
+
<xsl:template match="descr/p" priority="1">
|
|
596
|
+
<xsl:apply-templates/>
|
|
597
|
+
</xsl:template>
|
|
598
|
+
|
|
599
|
+
<xsl:template match="p">
|
|
600
|
+
<xsl:apply-templates/>
|
|
601
|
+
<xsl:text>�par </xsl:text>
|
|
602
|
+
</xsl:template>
|
|
603
|
+
|
|
604
|
+
<!--
|
|
605
|
+
NP: the match expression in the following template needs refining.
|
|
606
|
+
When an 'eg' contains exactly one node and this node is a PI,
|
|
607
|
+
do not generate any environment, but just process the child.
|
|
608
|
+
-->
|
|
609
|
+
<xsl:template match="eg[count(processing-instruction()) = 1]">
|
|
610
|
+
<xsl:apply-templates/>
|
|
611
|
+
</xsl:template>
|
|
612
|
+
|
|
613
|
+
<xsl:template match="eg">
|
|
614
|
+
<xsl:choose>
|
|
615
|
+
<xsl:when test="@role">
|
|
616
|
+
<xsl:choose>
|
|
617
|
+
<xsl:when test="@role='mathml-error'">
|
|
618
|
+
<xsl:text>�begin{verbatim}</xsl:text>
|
|
619
|
+
<xsl:comment>error</xsl:comment>
|
|
620
|
+
<xsl:apply-templates/>
|
|
621
|
+
<xsl:text>\end{verbatim}
|
|
622
|
+
</xsl:text>
|
|
623
|
+
</xsl:when>
|
|
624
|
+
<xsl:when test="@role='text'">
|
|
625
|
+
<xsl:text>�begin{flushleft}</xsl:text>
|
|
626
|
+
<xsl:apply-templates/>
|
|
627
|
+
<xsl:text>�end{flushleft}</xsl:text>
|
|
628
|
+
</xsl:when>
|
|
629
|
+
<xsl:otherwise>
|
|
630
|
+
<xsl:text>�begin{verbatim}</xsl:text>
|
|
631
|
+
<xsl:apply-templates/>
|
|
632
|
+
<xsl:text>\end{verbatim}
|
|
633
|
+
</xsl:text>
|
|
634
|
+
</xsl:otherwise>
|
|
635
|
+
</xsl:choose>
|
|
636
|
+
</xsl:when>
|
|
637
|
+
<xsl:otherwise>
|
|
638
|
+
<xsl:text>�begin{verbatim}</xsl:text>
|
|
639
|
+
<xsl:apply-templates/>
|
|
640
|
+
<xsl:text>\end{verbatim}
|
|
641
|
+
</xsl:text>
|
|
642
|
+
</xsl:otherwise>
|
|
643
|
+
</xsl:choose>
|
|
644
|
+
</xsl:template>
|
|
645
|
+
|
|
646
|
+
<xsl:template match="ednote">
|
|
647
|
+
<xsl:text>�begin{flushleft}</xsl:text>
|
|
648
|
+
<xsl:text>�textbf{Editor's note:}</xsl:text>
|
|
649
|
+
<xsl:apply-templates/>
|
|
650
|
+
<xsl:text>�end{flushleft}</xsl:text>
|
|
651
|
+
</xsl:template>
|
|
652
|
+
|
|
653
|
+
<xsl:template match="ednote/date">
|
|
654
|
+
<xsl:text>(</xsl:text>
|
|
655
|
+
<xsl:apply-templates/>
|
|
656
|
+
<xsl:text>)�\</xsl:text>
|
|
657
|
+
</xsl:template>
|
|
658
|
+
|
|
659
|
+
<xsl:template match="edtext">
|
|
660
|
+
<xsl:apply-templates/>
|
|
661
|
+
</xsl:template>
|
|
662
|
+
|
|
663
|
+
<xsl:template match="issue">
|
|
664
|
+
<xsl:text>�begin{flushleft}</xsl:text>
|
|
665
|
+
<xsl:text>�textbf{Issue (</xsl:text>
|
|
666
|
+
<xsl:value-of select="substring-after(@id,'-')"/>
|
|
667
|
+
<xsl:text>):}</xsl:text>
|
|
668
|
+
<xsl:apply-templates/>
|
|
669
|
+
<xsl:text>�end{flushleft}</xsl:text>
|
|
670
|
+
</xsl:template>
|
|
671
|
+
|
|
672
|
+
<xsl:template match="note">
|
|
673
|
+
<xsl:text>�begin{flushleft}</xsl:text>
|
|
674
|
+
<xsl:text>�textbf{Note:}</xsl:text>
|
|
675
|
+
<xsl:apply-templates/>
|
|
676
|
+
<xsl:text>�end{flushleft}</xsl:text>
|
|
677
|
+
</xsl:template>
|
|
678
|
+
|
|
679
|
+
<xsl:template match="ednote/p|issue/p|note/p">
|
|
680
|
+
<xsl:apply-templates/>
|
|
681
|
+
</xsl:template>
|
|
682
|
+
|
|
683
|
+
<!-- Tables -->
|
|
684
|
+
<xsl:template match="table">
|
|
685
|
+
<xsl:text>�begin{htable}</xsl:text>
|
|
686
|
+
<xsl:apply-templates select="caption"/>
|
|
687
|
+
<xsl:text>�begin{tabularx}{�linewidth}
|
|
688
|
+
{@{�extracolsep{�fill}}</xsl:text>
|
|
689
|
+
<xsl:apply-templates mode="table-preamble" select="."/>
|
|
690
|
+
<xsl:text>@{�extracolsep{�fill}}}
|
|
691
|
+
</xsl:text>
|
|
692
|
+
<xsl:apply-templates select="thead|tbody"/>
|
|
693
|
+
<xsl:text>�end{tabularx}</xsl:text>
|
|
694
|
+
<xsl:text>�end{htable}</xsl:text>
|
|
695
|
+
</xsl:template>
|
|
696
|
+
|
|
697
|
+
<xsl:template match="key('id','dom_elementTable')/table" priority="10">
|
|
698
|
+
<xsl:text>�begin{longtable}[c]{ll}</xsl:text>
|
|
699
|
+
<xsl:apply-templates select="thead"/>
|
|
700
|
+
<xsl:text>�endhead</xsl:text>
|
|
701
|
+
<xsl:apply-templates select="tbody"/>
|
|
702
|
+
<xsl:text>�end{longtable}</xsl:text>
|
|
703
|
+
</xsl:template>
|
|
704
|
+
|
|
705
|
+
<xsl:template match="table" mode="table-preamble">
|
|
706
|
+
<xsl:for-each select="tbody/tr[1]/td">l</xsl:for-each>
|
|
707
|
+
</xsl:template>
|
|
708
|
+
|
|
709
|
+
<xsl:template match="key('id','fund_table-attval')" mode="table-preamble">
|
|
710
|
+
lX
|
|
711
|
+
</xsl:template>
|
|
712
|
+
|
|
713
|
+
<xsl:template match="key('id','contm_table-funopqual')" mode="table-preamble">
|
|
714
|
+
lX
|
|
715
|
+
</xsl:template>
|
|
716
|
+
|
|
717
|
+
<xsl:template match="key('id','presm_table-mpadded')" mode="table-preamble" >
|
|
718
|
+
lXl
|
|
719
|
+
</xsl:template>
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
<xsl:template match="key('id','presm_table-mo')" mode="table-preamble" >
|
|
723
|
+
llX
|
|
724
|
+
</xsl:template>
|
|
725
|
+
|
|
726
|
+
<xsl:template match="key('id','presm_table-reqarg')" mode="table-preamble" >
|
|
727
|
+
@{�extracolsep{�fill}}ll>{�raggedright�let�\�tabularnewline}X@{�extracolsep{�fill}}
|
|
728
|
+
</xsl:template>
|
|
729
|
+
|
|
730
|
+
<xsl:template match="key('id','presm_commatt')//table" mode="table-preamble" >
|
|
731
|
+
lXl
|
|
732
|
+
</xsl:template>
|
|
733
|
+
|
|
734
|
+
<xsl:template match="key('id','presm_mi')//table" mode="table-preamble" >
|
|
735
|
+
lXl
|
|
736
|
+
</xsl:template>
|
|
737
|
+
|
|
738
|
+
<xsl:template match="key('id','contm_container')/p[1]/table" mode="table-preamble">
|
|
739
|
+
lL
|
|
740
|
+
</xsl:template>
|
|
741
|
+
<xsl:template match="key('id','contm_opwithqual')/p[1]/table" mode="table-preamble">
|
|
742
|
+
lL
|
|
743
|
+
</xsl:template>
|
|
744
|
+
|
|
745
|
+
<xsl:template match="key('id','chars_table-white')" mode="table-preamble" >
|
|
746
|
+
llX
|
|
747
|
+
</xsl:template>
|
|
748
|
+
|
|
749
|
+
<xsl:template match="key('id','chars_table-unicode-block')" mode="table-preamble" >
|
|
750
|
+
lX
|
|
751
|
+
</xsl:template>
|
|
752
|
+
|
|
753
|
+
<xsl:template match="thead">
|
|
754
|
+
<xsl:apply-templates select="tr"/>
|
|
755
|
+
<xsl:text>�hline
</xsl:text>
|
|
756
|
+
</xsl:template>
|
|
757
|
+
|
|
758
|
+
<xsl:template match="tbody">
|
|
759
|
+
<tbody>
|
|
760
|
+
<xsl:apply-templates select="tr"/>
|
|
761
|
+
</tbody>
|
|
762
|
+
</xsl:template>
|
|
763
|
+
|
|
764
|
+
<xsl:template match="tr">
|
|
765
|
+
<xsl:apply-templates select="td"/>
|
|
766
|
+
<xsl:if test="parent::thead or (position() != last())">
|
|
767
|
+
<xsl:text>�\
</xsl:text>
|
|
768
|
+
</xsl:if>
|
|
769
|
+
</xsl:template>
|
|
770
|
+
|
|
771
|
+
<xsl:template match="td">
|
|
772
|
+
<xsl:text>�relax </xsl:text>
|
|
773
|
+
<xsl:apply-templates/>
|
|
774
|
+
<xsl:if test="position() != last()">
|
|
775
|
+
<xsl:text>�tablecell </xsl:text>
|
|
776
|
+
</xsl:if>
|
|
777
|
+
</xsl:template>
|
|
778
|
+
|
|
779
|
+
<xsl:template match="caption">
|
|
780
|
+
<xsl:text>�caption{</xsl:text>
|
|
781
|
+
<xsl:apply-templates/>
|
|
782
|
+
<xsl:text>}</xsl:text>
|
|
783
|
+
</xsl:template>
|
|
784
|
+
|
|
785
|
+
<!-- References -->
|
|
786
|
+
<xsl:template match="loc" >
|
|
787
|
+
<xsl:text>�href{</xsl:text>
|
|
788
|
+
<xsl:value-of select="@href"/>
|
|
789
|
+
<xsl:text>}{</xsl:text>
|
|
790
|
+
<xsl:apply-templates/>
|
|
791
|
+
<xsl:text>}</xsl:text>
|
|
792
|
+
</xsl:template>
|
|
793
|
+
|
|
794
|
+
<xsl:template match="div2//loc[@href=.]" priority="10">
|
|
795
|
+
<xsl:text>�url{</xsl:text>
|
|
796
|
+
<xsl:value-of select="@href"/>
|
|
797
|
+
<xsl:text>}</xsl:text>
|
|
798
|
+
</xsl:template>
|
|
799
|
+
|
|
800
|
+
<xsl:template match="bibl/loc[@href=.]" priority="10">
|
|
801
|
+
<xsl:text>�url{</xsl:text>
|
|
802
|
+
<xsl:value-of select="@href"/>
|
|
803
|
+
<xsl:text>}</xsl:text>
|
|
804
|
+
</xsl:template>
|
|
805
|
+
|
|
806
|
+
<!--
|
|
807
|
+
<xsl:template match="loc">
|
|
808
|
+
<xsl:text>�href{</xsl:text>
|
|
809
|
+
<xsl:apply-templates/>
|
|
810
|
+
<xsl:value-of select="@href"/>
|
|
811
|
+
<xsl:text>}{</xsl:text>
|
|
812
|
+
<xsl:text>}�\</xsl:text>
|
|
813
|
+
</xsl:template>
|
|
814
|
+
-->
|
|
815
|
+
|
|
816
|
+
<xsl:template match="titleref">
|
|
817
|
+
<xsl:apply-templates/>
|
|
818
|
+
</xsl:template>
|
|
819
|
+
|
|
820
|
+
<xsl:template match="bibref">
|
|
821
|
+
<xsl:text>�cite{</xsl:text>
|
|
822
|
+
<xsl:value-of select="@ref"/>
|
|
823
|
+
<xsl:text>}</xsl:text>
|
|
824
|
+
</xsl:template>
|
|
825
|
+
|
|
826
|
+
<xsl:template match="specref">
|
|
827
|
+
<xsl:for-each select="key('id',@ref)">
|
|
828
|
+
<xsl:call-template name="makeref"/>
|
|
829
|
+
</xsl:for-each>
|
|
830
|
+
</xsl:template>
|
|
831
|
+
|
|
832
|
+
|
|
833
|
+
<xsl:template match="specref[@ref='status']">
|
|
834
|
+
<xsl:text>�hyperref[status]{Status}</xsl:text>
|
|
835
|
+
</xsl:template>
|
|
836
|
+
|
|
837
|
+
<!--
|
|
838
|
+
<xsl:template match="specref">
|
|
839
|
+
<xsl:variable name="target" select="key('ids', @ref)[1]"/>
|
|
840
|
+
<xsl:choose>
|
|
841
|
+
<xsl:when test="local-name($target)='issue'">
|
|
842
|
+
<xsl:text>[</xsl:text>
|
|
843
|
+
<a>
|
|
844
|
+
<xsl:attribute name="href">
|
|
845
|
+
<xsl:call-template name="href.target">
|
|
846
|
+
<xsl:with-param name="target" select="key('ids', @ref)"/>
|
|
847
|
+
</xsl:call-template>
|
|
848
|
+
</xsl:attribute>
|
|
849
|
+
<b>
|
|
850
|
+
<xsl:text>Issue </xsl:text>
|
|
851
|
+
<xsl:apply-templates select="key('ids', @ref)" mode="number"/>
|
|
852
|
+
<xsl:text>: </xsl:text>
|
|
853
|
+
<xsl:for-each select="key('ids', @ref)/head">
|
|
854
|
+
<xsl:apply-templates/>
|
|
855
|
+
</xsl:for-each>
|
|
856
|
+
</b>
|
|
857
|
+
</a>
|
|
858
|
+
<xsl:text>]</xsl:text>
|
|
859
|
+
</xsl:when>
|
|
860
|
+
<xsl:when test="starts-with(local-name($target), 'div')">
|
|
861
|
+
<a>
|
|
862
|
+
<xsl:attribute name="href">
|
|
863
|
+
<xsl:call-template name="href.target">
|
|
864
|
+
<xsl:with-param name="target" select="key('ids', @ref)"/>
|
|
865
|
+
</xsl:call-template>
|
|
866
|
+
</xsl:attribute>
|
|
867
|
+
<xsl:for-each select="$target">
|
|
868
|
+
<xsl:choose>
|
|
869
|
+
<xsl:when test="(self::div1) and parent::body">Chapter </xsl:when>
|
|
870
|
+
<xsl:when test="(self::div1 or self::inform-div1) and
|
|
871
|
+
parent::back">Appendix </xsl:when>
|
|
872
|
+
<xsl:otherwise>Section </xsl:otherwise>
|
|
873
|
+
</xsl:choose>
|
|
874
|
+
</xsl:for-each>
|
|
875
|
+
<xsl:apply-templates select="key('ids', @ref)" mode="divnum"/>
|
|
876
|
+
<xsl:apply-templates select="key('ids', @ref)/head" mode="text"/>
|
|
877
|
+
</a>
|
|
878
|
+
</xsl:when>
|
|
879
|
+
<xsl:when test="starts-with(local-name($target), 'inform-div')">
|
|
880
|
+
<a>
|
|
881
|
+
<xsl:attribute name="href">
|
|
882
|
+
<xsl:call-template name="href.target">
|
|
883
|
+
<xsl:with-param name="target" select="key('ids', @ref)"/>
|
|
884
|
+
</xsl:call-template>
|
|
885
|
+
</xsl:attribute>
|
|
886
|
+
<xsl:text>Appendix </xsl:text>
|
|
887
|
+
<xsl:apply-templates select="key('ids', @ref)" mode="divnum"/>
|
|
888
|
+
<xsl:apply-templates select="key('ids', @ref)/head" mode="text"/>
|
|
889
|
+
</a>
|
|
890
|
+
</xsl:when>
|
|
891
|
+
<xsl:when test="local-name($target) = 'vcnote'">
|
|
892
|
+
<b>
|
|
893
|
+
<xsl:text>[VC: </xsl:text>
|
|
894
|
+
<a>
|
|
895
|
+
<xsl:attribute name="href">
|
|
896
|
+
<xsl:call-template name="href.target">
|
|
897
|
+
<xsl:with-param name="target" select="key('ids', @ref)"/>
|
|
898
|
+
</xsl:call-template>
|
|
899
|
+
</xsl:attribute>
|
|
900
|
+
<xsl:apply-templates select="key('ids', @ref)/head" mode="text"/>
|
|
901
|
+
</a>
|
|
902
|
+
<xsl:text>]</xsl:text>
|
|
903
|
+
</b>
|
|
904
|
+
</xsl:when>
|
|
905
|
+
<xsl:when test="local-name($target) = 'prod'">
|
|
906
|
+
<b>
|
|
907
|
+
<xsl:text>[PROD: </xsl:text>
|
|
908
|
+
<a>
|
|
909
|
+
<xsl:attribute name="href">
|
|
910
|
+
<xsl:call-template name="href.target">
|
|
911
|
+
<xsl:with-param name="target" select="key('ids', @ref)"/>
|
|
912
|
+
</xsl:call-template>
|
|
913
|
+
</xsl:attribute>
|
|
914
|
+
<xsl:apply-templates select="$target" mode="number-simple"/>
|
|
915
|
+
</a>
|
|
916
|
+
<xsl:text>]</xsl:text>
|
|
917
|
+
</b>
|
|
918
|
+
</xsl:when>
|
|
919
|
+
<xsl:when test="local-name($target) = 'label'">
|
|
920
|
+
<b>
|
|
921
|
+
<xsl:text>[</xsl:text>
|
|
922
|
+
<a>
|
|
923
|
+
<xsl:attribute name="href">
|
|
924
|
+
<xsl:call-template name="href.target">
|
|
925
|
+
<xsl:with-param name="target" select="key('ids', @ref)"/>
|
|
926
|
+
</xsl:call-template>
|
|
927
|
+
</xsl:attribute>
|
|
928
|
+
<xsl:value-of select="$target"/>
|
|
929
|
+
</a>
|
|
930
|
+
<xsl:text>]</xsl:text>
|
|
931
|
+
</b>
|
|
932
|
+
</xsl:when>
|
|
933
|
+
<xsl:when test="local-name($target)='MMLdefinition'">
|
|
934
|
+
<a>
|
|
935
|
+
<xsl:attribute name="href">
|
|
936
|
+
<xsl:call-template name="href.target">
|
|
937
|
+
<xsl:with-param name="target" select="key('ids', @ref)"/>
|
|
938
|
+
</xsl:call-template>
|
|
939
|
+
</xsl:attribute>
|
|
940
|
+
<b>
|
|
941
|
+
<xsl:value-of select="key('ids', @ref)/name"/>
|
|
942
|
+
</b>
|
|
943
|
+
</a>
|
|
944
|
+
</xsl:when>
|
|
945
|
+
<xsl:otherwise>
|
|
946
|
+
<xsl:message>
|
|
947
|
+
<xsl:text>Unsupported specref to </xsl:text>
|
|
948
|
+
<xsl:value-of select="local-name($target)"/>
|
|
949
|
+
<xsl:text> [</xsl:text>
|
|
950
|
+
<xsl:value-of select="@ref"/>
|
|
951
|
+
<xsl:text>] </xsl:text>
|
|
952
|
+
<xsl:text> (Contact stylesheet maintainer).</xsl:text>
|
|
953
|
+
</xsl:message>
|
|
954
|
+
<b>
|
|
955
|
+
<a>
|
|
956
|
+
<xsl:attribute name="href">
|
|
957
|
+
<xsl:call-template name="href.target">
|
|
958
|
+
<xsl:with-param name="target" select="key('ids', @ref)"/>
|
|
959
|
+
</xsl:call-template>
|
|
960
|
+
</xsl:attribute>
|
|
961
|
+
<xsl:text>???</xsl:text>
|
|
962
|
+
</a>
|
|
963
|
+
</b>
|
|
964
|
+
</xsl:otherwise>
|
|
965
|
+
</xsl:choose>
|
|
966
|
+
</xsl:template>
|
|
967
|
+
-->
|
|
968
|
+
<xsl:template match="intref">
|
|
969
|
+
<xsl:text>�hyperref[</xsl:text>
|
|
970
|
+
<xsl:value-of select="@ref"/>
|
|
971
|
+
<xsl:text>]{</xsl:text>
|
|
972
|
+
<xsl:apply-templates/>
|
|
973
|
+
<xsl:text>}</xsl:text>
|
|
974
|
+
</xsl:template>
|
|
975
|
+
|
|
976
|
+
<xsl:template match="xspecref">
|
|
977
|
+
<xsl:apply-templates/>
|
|
978
|
+
</xsl:template>
|
|
979
|
+
|
|
980
|
+
<xsl:template match="termref">
|
|
981
|
+
<xsl:apply-templates/>
|
|
982
|
+
</xsl:template>
|
|
983
|
+
|
|
984
|
+
<xsl:template match="vcnote">
|
|
985
|
+
<xsl:call-template name="makeanchor"/>
|
|
986
|
+
<xsl:text>�textbf{Validity Constraint: </xsl:text>
|
|
987
|
+
<xsl:value-of select="head"/>
|
|
988
|
+
<xsl:text>}�par </xsl:text>
|
|
989
|
+
<xsl:apply-templates/>
|
|
990
|
+
</xsl:template>
|
|
991
|
+
|
|
992
|
+
<xsl:template match="wfcnote">
|
|
993
|
+
<xsl:call-template name="makeanchor"/>
|
|
994
|
+
<xsl:text>�textbf{Well-formedness Constraint: </xsl:text>
|
|
995
|
+
<xsl:value-of select="head"/>
|
|
996
|
+
<xsl:text>}�par </xsl:text>
|
|
997
|
+
<xsl:apply-templates/>
|
|
998
|
+
</xsl:template>
|
|
999
|
+
|
|
1000
|
+
<xsl:template match="xtermref">
|
|
1001
|
+
<xsl:apply-templates/>
|
|
1002
|
+
</xsl:template>
|
|
1003
|
+
|
|
1004
|
+
<!-- Inlines -->
|
|
1005
|
+
<xsl:template match="termdef">
|
|
1006
|
+
<xsl:apply-templates/>
|
|
1007
|
+
</xsl:template>
|
|
1008
|
+
|
|
1009
|
+
<xsl:template match="term">
|
|
1010
|
+
<xsl:text>�textbf{</xsl:text>
|
|
1011
|
+
<xsl:apply-templates/>
|
|
1012
|
+
<xsl:text>}</xsl:text>
|
|
1013
|
+
</xsl:template>
|
|
1014
|
+
|
|
1015
|
+
<xsl:template match="code">
|
|
1016
|
+
<xsl:text/>�strc[<xsl:value-of select="string-length(.) div 2.5"/>em]{<xsl:text/>
|
|
1017
|
+
<xsl:apply-templates/>
|
|
1018
|
+
<xsl:text>}</xsl:text>
|
|
1019
|
+
</xsl:template>
|
|
1020
|
+
|
|
1021
|
+
<xsl:template match="code/text()">
|
|
1022
|
+
<xsl:value-of select="translate(.,'-=/','¡¢¤')"/>
|
|
1023
|
+
</xsl:template>
|
|
1024
|
+
|
|
1025
|
+
<xsl:template match="emph">
|
|
1026
|
+
<xsl:text>�emph{</xsl:text>
|
|
1027
|
+
<xsl:apply-templates/>
|
|
1028
|
+
<xsl:text>}</xsl:text>
|
|
1029
|
+
</xsl:template>
|
|
1030
|
+
|
|
1031
|
+
<xsl:template match="eg/emph">
|
|
1032
|
+
<!-- <xsl:call-template name="makeanchor"/>-->
|
|
1033
|
+
<xsl:text>�egemph </xsl:text>
|
|
1034
|
+
<xsl:apply-templates/>
|
|
1035
|
+
<xsl:text>�relax </xsl:text>
|
|
1036
|
+
</xsl:template>
|
|
1037
|
+
|
|
1038
|
+
|
|
1039
|
+
<xsl:template match="key('id','parsing_dtd')/eg/phrase" priority="10">
|
|
1040
|
+
<xsl:if test="@id">�eglabel*<xsl:value-of select="@id"/>*</xsl:if>
|
|
1041
|
+
</xsl:template>
|
|
1042
|
+
|
|
1043
|
+
<xsl:template match="key('id','parsing_dtd')/eg/intref" priority="10">
|
|
1044
|
+
<xsl:text>�eghyperref[</xsl:text>
|
|
1045
|
+
<xsl:value-of select="@ref"/>
|
|
1046
|
+
<xsl:text>]*</xsl:text>
|
|
1047
|
+
<xsl:apply-templates/>
|
|
1048
|
+
<xsl:text>*</xsl:text>
|
|
1049
|
+
</xsl:template>
|
|
1050
|
+
|
|
1051
|
+
<xsl:template match="phrase">
|
|
1052
|
+
<xsl:apply-templates/>
|
|
1053
|
+
</xsl:template>
|
|
1054
|
+
|
|
1055
|
+
<xsl:template match="phrase[.='application-specific']">
|
|
1056
|
+
<xsl:text>application�hspace{0pt}-specific</xsl:text>
|
|
1057
|
+
</xsl:template>
|
|
1058
|
+
|
|
1059
|
+
|
|
1060
|
+
<xsl:template match="*[@diff='del']" priority="1001"/>
|
|
1061
|
+
|
|
1062
|
+
|
|
1063
|
+
<xsl:template match="att">
|
|
1064
|
+
<xsl:text/>�strc[<xsl:value-of select="string-length(.) div 2.5"/>em]{<xsl:text/>
|
|
1065
|
+
<xsl:apply-templates/>
|
|
1066
|
+
<xsl:text>}</xsl:text>
|
|
1067
|
+
</xsl:template>
|
|
1068
|
+
|
|
1069
|
+
<xsl:template match="attval">
|
|
1070
|
+
<xsl:text/>�strc[<xsl:value-of select="string-length(.) div 2.5"/>em]{"<xsl:text/>
|
|
1071
|
+
<xsl:apply-templates/>
|
|
1072
|
+
<xsl:text>"}</xsl:text>
|
|
1073
|
+
</xsl:template>
|
|
1074
|
+
|
|
1075
|
+
<xsl:template match="el">
|
|
1076
|
+
<xsl:text/>�strc[<xsl:value-of select="string-length(.) div 2.5"/>em]{<xsl:text/>
|
|
1077
|
+
<xsl:choose>
|
|
1078
|
+
<xsl:when test="@role='starttag'">
|
|
1079
|
+
<xsl:text>�textless </xsl:text>
|
|
1080
|
+
<xsl:apply-templates/>
|
|
1081
|
+
<xsl:text>�textgreater </xsl:text>
|
|
1082
|
+
</xsl:when>
|
|
1083
|
+
<xsl:when test="@role='endtag'">
|
|
1084
|
+
<xsl:text>�textless/</xsl:text>
|
|
1085
|
+
<xsl:apply-templates/>
|
|
1086
|
+
<xsl:text>�textgreater </xsl:text>
|
|
1087
|
+
</xsl:when>
|
|
1088
|
+
<xsl:when test="@role='emptytag'">
|
|
1089
|
+
<xsl:text>�textless </xsl:text>
|
|
1090
|
+
<xsl:apply-templates/>
|
|
1091
|
+
<xsl:text>/�textgreater </xsl:text>
|
|
1092
|
+
</xsl:when>
|
|
1093
|
+
<xsl:otherwise>
|
|
1094
|
+
<xsl:apply-templates/>
|
|
1095
|
+
</xsl:otherwise>
|
|
1096
|
+
</xsl:choose>
|
|
1097
|
+
<xsl:text>}</xsl:text>
|
|
1098
|
+
</xsl:template>
|
|
1099
|
+
|
|
1100
|
+
<!-- hack for OT encoding -->
|
|
1101
|
+
<xsl:template match="kw">
|
|
1102
|
+
<xsl:text/>�strc[<xsl:value-of select="string-length(.) div 2.5"/>em]{<xsl:text/>
|
|
1103
|
+
<xsl:choose>
|
|
1104
|
+
<xsl:when test="@role='entity'">
|
|
1105
|
+
<xsl:text>&</xsl:text>
|
|
1106
|
+
<xsl:apply-templates/>
|
|
1107
|
+
<xsl:text>;</xsl:text>
|
|
1108
|
+
</xsl:when>
|
|
1109
|
+
<xsl:when test="@role='mchar'">
|
|
1110
|
+
<xsl:text>�textless mchar name=�linebreak[0]"</xsl:text>
|
|
1111
|
+
<xsl:apply-templates/>
|
|
1112
|
+
<xsl:text>" /�textgreater </xsl:text>
|
|
1113
|
+
</xsl:when>
|
|
1114
|
+
<xsl:when test="@role">
|
|
1115
|
+
<xsl:text>Error: </xsl:text>
|
|
1116
|
+
<xsl:apply-templates/>
|
|
1117
|
+
</xsl:when>
|
|
1118
|
+
<xsl:otherwise>
|
|
1119
|
+
<xsl:apply-templates/>
|
|
1120
|
+
</xsl:otherwise>
|
|
1121
|
+
</xsl:choose>
|
|
1122
|
+
<xsl:text>}</xsl:text>
|
|
1123
|
+
</xsl:template>
|
|
1124
|
+
|
|
1125
|
+
<xsl:template match="var">
|
|
1126
|
+
<xsl:text>�(</xsl:text>
|
|
1127
|
+
<xsl:apply-templates/>
|
|
1128
|
+
<xsl:text>�)</xsl:text>
|
|
1129
|
+
</xsl:template>
|
|
1130
|
+
|
|
1131
|
+
<xsl:template match="sub/var">
|
|
1132
|
+
<xsl:apply-templates/>
|
|
1133
|
+
</xsl:template>
|
|
1134
|
+
|
|
1135
|
+
<xsl:template match="sup/var">
|
|
1136
|
+
<xsl:apply-templates/>
|
|
1137
|
+
</xsl:template>
|
|
1138
|
+
|
|
1139
|
+
<xsl:template match="sub">
|
|
1140
|
+
<xsl:text>�(�sb{</xsl:text>
|
|
1141
|
+
<xsl:apply-templates/>
|
|
1142
|
+
<xsl:text>}�)</xsl:text>
|
|
1143
|
+
</xsl:template>
|
|
1144
|
+
|
|
1145
|
+
<xsl:template match="sup">
|
|
1146
|
+
<xsl:text>�(�sp{</xsl:text>
|
|
1147
|
+
<xsl:apply-templates/>
|
|
1148
|
+
<xsl:text>}�)</xsl:text>
|
|
1149
|
+
</xsl:template>
|
|
1150
|
+
|
|
1151
|
+
<!-- hack for TeX logo -->
|
|
1152
|
+
<xsl:template match="sub[.='E' and starts-with(following::text(),'X')]">
|
|
1153
|
+
<xsl:text>�TTeX{}</xsl:text>
|
|
1154
|
+
</xsl:template>
|
|
1155
|
+
|
|
1156
|
+
<!-- Lists -->
|
|
1157
|
+
|
|
1158
|
+
<xsl:template match="blist">
|
|
1159
|
+
<xsl:text>�begin{thebibliography}{99}</xsl:text>
|
|
1160
|
+
<xsl:apply-templates>
|
|
1161
|
+
<xsl:sort select="@id"/>
|
|
1162
|
+
</xsl:apply-templates>
|
|
1163
|
+
<xsl:text>�end{thebibliography}</xsl:text>
|
|
1164
|
+
</xsl:template>
|
|
1165
|
+
|
|
1166
|
+
<xsl:template match="slist">
|
|
1167
|
+
<xsl:text>
�begin{itemize}</xsl:text>
|
|
1168
|
+
<xsl:apply-templates/>
|
|
1169
|
+
<xsl:text>�end{itemize}
</xsl:text>
|
|
1170
|
+
</xsl:template>
|
|
1171
|
+
|
|
1172
|
+
<xsl:template match="sitem">
|
|
1173
|
+
<xsl:text>
�item </xsl:text>
|
|
1174
|
+
<xsl:apply-templates/>
|
|
1175
|
+
</xsl:template>
|
|
1176
|
+
|
|
1177
|
+
<xsl:template match="blist/bibl">
|
|
1178
|
+
<xsl:choose>
|
|
1179
|
+
<xsl:when test="@key">
|
|
1180
|
+
<xsl:text>�bibitem[</xsl:text>
|
|
1181
|
+
<xsl:value-of select="@key"/>
|
|
1182
|
+
<xsl:text>]</xsl:text>
|
|
1183
|
+
</xsl:when>
|
|
1184
|
+
<xsl:otherwise>
|
|
1185
|
+
<xsl:text>�bibitem[</xsl:text>
|
|
1186
|
+
<xsl:value-of select="@id"/>
|
|
1187
|
+
<xsl:text>]</xsl:text>
|
|
1188
|
+
</xsl:otherwise>
|
|
1189
|
+
</xsl:choose>
|
|
1190
|
+
<xsl:text>{</xsl:text>
|
|
1191
|
+
<xsl:value-of select="@id"/>
|
|
1192
|
+
<xsl:text>}</xsl:text>
|
|
1193
|
+
<xsl:apply-templates/>
|
|
1194
|
+
</xsl:template>
|
|
1195
|
+
|
|
1196
|
+
<xsl:template match="orglist">
|
|
1197
|
+
<xsl:text>�begin{itemize}</xsl:text>
|
|
1198
|
+
<xsl:apply-templates/>
|
|
1199
|
+
<xsl:text>�end{itemize}</xsl:text>
|
|
1200
|
+
</xsl:template>
|
|
1201
|
+
|
|
1202
|
+
<xsl:template match="member">
|
|
1203
|
+
<xsl:text>�item </xsl:text>
|
|
1204
|
+
<xsl:apply-templates select="name"/>
|
|
1205
|
+
<xsl:if test="role">
|
|
1206
|
+
<xsl:text> (</xsl:text>
|
|
1207
|
+
<xsl:apply-templates select="role"/>
|
|
1208
|
+
<xsl:text>) </xsl:text>
|
|
1209
|
+
</xsl:if>
|
|
1210
|
+
<xsl:if test="affiliation">
|
|
1211
|
+
<xsl:text>, </xsl:text>
|
|
1212
|
+
<xsl:apply-templates select="affiliation"/>
|
|
1213
|
+
</xsl:if>
|
|
1214
|
+
</xsl:template>
|
|
1215
|
+
|
|
1216
|
+
<xsl:template match="member/affiliation">
|
|
1217
|
+
<xsl:apply-templates/>
|
|
1218
|
+
</xsl:template>
|
|
1219
|
+
|
|
1220
|
+
<xsl:template match="member/role">
|
|
1221
|
+
<xsl:apply-templates/>
|
|
1222
|
+
</xsl:template>
|
|
1223
|
+
|
|
1224
|
+
<xsl:template match="olist">
|
|
1225
|
+
<xsl:text>�begin{enumerate}</xsl:text>
|
|
1226
|
+
<xsl:apply-templates/>
|
|
1227
|
+
<xsl:text>�end{enumerate}</xsl:text>
|
|
1228
|
+
</xsl:template>
|
|
1229
|
+
|
|
1230
|
+
<xsl:template match="ulist">
|
|
1231
|
+
<xsl:text>�begin{itemize}</xsl:text>
|
|
1232
|
+
<xsl:apply-templates/>
|
|
1233
|
+
<xsl:text>�end{itemize}</xsl:text>
|
|
1234
|
+
</xsl:template>
|
|
1235
|
+
|
|
1236
|
+
<xsl:template match="glist">
|
|
1237
|
+
<xsl:text>�begin{description}</xsl:text>
|
|
1238
|
+
<xsl:apply-templates/>
|
|
1239
|
+
<xsl:text>�end{description}</xsl:text>
|
|
1240
|
+
</xsl:template>
|
|
1241
|
+
|
|
1242
|
+
<xsl:template match="item">
|
|
1243
|
+
<xsl:text>�item </xsl:text>
|
|
1244
|
+
<xsl:apply-templates/>
|
|
1245
|
+
</xsl:template>
|
|
1246
|
+
|
|
1247
|
+
<xsl:template match="label">
|
|
1248
|
+
<xsl:text>�item[{</xsl:text>
|
|
1249
|
+
<xsl:apply-templates/>
|
|
1250
|
+
<xsl:text>}] </xsl:text>
|
|
1251
|
+
<xsl:if test="@id">�label{<xsl:value-of select="@id"/>}</xsl:if>
|
|
1252
|
+
</xsl:template>
|
|
1253
|
+
|
|
1254
|
+
<xsl:template match="def">
|
|
1255
|
+
<xsl:apply-templates/>
|
|
1256
|
+
</xsl:template>
|
|
1257
|
+
|
|
1258
|
+
<xsl:template match="gitem">
|
|
1259
|
+
<xsl:apply-templates/>
|
|
1260
|
+
</xsl:template>
|
|
1261
|
+
|
|
1262
|
+
<!-- Named templates -->
|
|
1263
|
+
|
|
1264
|
+
<xsl:template name="copyright">
|
|
1265
|
+
<xsl:text>Copyright �copyright� </xsl:text>
|
|
1266
|
+
<xsl:value-of select="$copyright"/>
|
|
1267
|
+
<xsl:text>~W3C�textsuperscript{�textregistered}� (MIT, ERCIM, Keio),
|
|
1268
|
+
All Rights Reserved.</xsl:text>
|
|
1269
|
+
<xsl:text>�href{http://www.w3.org/Consortium/Legal/ipr-notice.html#Legal_Disclaimer}
|
|
1270
|
+
{W3C liability},
|
|
1271
|
+
�href{http://www.w3.org/Consortium/Legal/ipr-notice.html#W3C_Trademarks}{trademark},
|
|
1272
|
+
�href{http://www.w3.org/Consortium/Legal/copyright-documents.html}{document use}
|
|
1273
|
+
and
|
|
1274
|
+
�href{http://www.w3.org/Consortium/Legal/copyright-software.html}
|
|
1275
|
+
{software licensing}
|
|
1276
|
+
rules apply.�par
|
|
1277
|
+
</xsl:text>
|
|
1278
|
+
</xsl:template>
|
|
1279
|
+
|
|
1280
|
+
<!-- produce a cross-reference target for the current element -->
|
|
1281
|
+
<xsl:template name="makeanchor">
|
|
1282
|
+
<xsl:text>�label{</xsl:text>
|
|
1283
|
+
<xsl:choose>
|
|
1284
|
+
<xsl:when test="@id">
|
|
1285
|
+
<xsl:value-of select="@id"/>
|
|
1286
|
+
</xsl:when>
|
|
1287
|
+
<xsl:otherwise>
|
|
1288
|
+
<xsl:value-of select="generate-id(.)"/>
|
|
1289
|
+
</xsl:otherwise>
|
|
1290
|
+
</xsl:choose>
|
|
1291
|
+
<xsl:text>}</xsl:text>
|
|
1292
|
+
</xsl:template>
|
|
1293
|
+
|
|
1294
|
+
<!-- produce a cross-reference to the current element -->
|
|
1295
|
+
<xsl:template name="makeref">
|
|
1296
|
+
<xsl:variable name="id">
|
|
1297
|
+
<xsl:choose>
|
|
1298
|
+
<xsl:when test="@id">
|
|
1299
|
+
<xsl:value-of select="@id"/>
|
|
1300
|
+
</xsl:when>
|
|
1301
|
+
<xsl:otherwise>
|
|
1302
|
+
<xsl:value-of select="generate-id(.)"/>
|
|
1303
|
+
</xsl:otherwise>
|
|
1304
|
+
</xsl:choose>
|
|
1305
|
+
</xsl:variable>
|
|
1306
|
+
<xsl:choose>
|
|
1307
|
+
<xsl:when test="self::div1 and ancestor::body">
|
|
1308
|
+
<xsl:text>Chapter~�ref{</xsl:text>
|
|
1309
|
+
<xsl:value-of select="@id"/>
|
|
1310
|
+
<xsl:text>}</xsl:text>
|
|
1311
|
+
</xsl:when>
|
|
1312
|
+
<xsl:when test="contains(name(.), 'div1') and ancestor::back">
|
|
1313
|
+
<xsl:text>Appendix~�ref{</xsl:text>
|
|
1314
|
+
<xsl:value-of select="@id"/>
|
|
1315
|
+
<xsl:text>}</xsl:text>
|
|
1316
|
+
</xsl:when>
|
|
1317
|
+
<xsl:when test="contains(name(.), 'div')">
|
|
1318
|
+
<xsl:text>Section~�ref{</xsl:text>
|
|
1319
|
+
<xsl:value-of select="@id"/>
|
|
1320
|
+
<xsl:text>}</xsl:text>
|
|
1321
|
+
</xsl:when>
|
|
1322
|
+
<xsl:when test="name(.) = 'interface'">
|
|
1323
|
+
<xsl:text>[�texttt{</xsl:text>
|
|
1324
|
+
<xsl:value-of select="@name"/>
|
|
1325
|
+
<xsl:text>} interface]</xsl:text>
|
|
1326
|
+
</xsl:when>
|
|
1327
|
+
<xsl:otherwise>
|
|
1328
|
+
<xsl:text>�ref{</xsl:text>
|
|
1329
|
+
<xsl:value-of select="@id"/>
|
|
1330
|
+
<xsl:text>}</xsl:text>
|
|
1331
|
+
</xsl:otherwise>
|
|
1332
|
+
</xsl:choose>
|
|
1333
|
+
</xsl:template>
|
|
1334
|
+
|
|
1335
|
+
<xsl:template match="nt">
|
|
1336
|
+
<xsl:text>�hyperref[</xsl:text>
|
|
1337
|
+
<xsl:value-of select="@def"/>
|
|
1338
|
+
<xsl:text>]{</xsl:text>
|
|
1339
|
+
<xsl:apply-templates/>
|
|
1340
|
+
<xsl:text>}</xsl:text>
|
|
1341
|
+
</xsl:template>
|
|
1342
|
+
|
|
1343
|
+
<xsl:template match="xnt">
|
|
1344
|
+
<xsl:apply-templates/>
|
|
1345
|
+
</xsl:template>
|
|
1346
|
+
|
|
1347
|
+
<xsl:template match="quote">
|
|
1348
|
+
<xsl:text>`</xsl:text>
|
|
1349
|
+
<xsl:apply-templates/>
|
|
1350
|
+
<xsl:text>'</xsl:text>
|
|
1351
|
+
</xsl:template>
|
|
1352
|
+
|
|
1353
|
+
<xsl:template match="graphic">
|
|
1354
|
+
<xsl:choose>
|
|
1355
|
+
<xsl:when test="@role='inline'">
|
|
1356
|
+
<xsl:if test="@valign='bottom'">�leavevmode�setbox0�hbox{</xsl:if>
|
|
1357
|
+
<xsl:text>�( </xsl:text>
|
|
1358
|
+
<xsl:value-of select="@alt"/>
|
|
1359
|
+
<xsl:text> �)</xsl:text>
|
|
1360
|
+
<xsl:if test="@valign='bottom'">}�raise�dp0�box0�relax </xsl:if>
|
|
1361
|
+
</xsl:when>
|
|
1362
|
+
<xsl:otherwise>
|
|
1363
|
+
<xsl:text>�[ </xsl:text>
|
|
1364
|
+
<xsl:value-of select="@alt"/>
|
|
1365
|
+
<xsl:text> �]</xsl:text>
|
|
1366
|
+
</xsl:otherwise>
|
|
1367
|
+
</xsl:choose>
|
|
1368
|
+
</xsl:template>
|
|
1369
|
+
|
|
1370
|
+
<!-- Templates for DOM-style interface definitions -->
|
|
1371
|
+
<xsl:template match="interface">
|
|
1372
|
+
<xsl:text>�subsection*{Interface </xsl:text>
|
|
1373
|
+
<xsl:value-of select="@name"/>
|
|
1374
|
+
<xsl:text>}</xsl:text>
|
|
1375
|
+
<xsl:call-template name="makeanchor"/>
|
|
1376
|
+
<xsl:if test="string-length(normalize-space(@inherits))>0">
|
|
1377
|
+
<xsl:text>
|
|
1378
|
+
�textbf{Extends:}
|
|
1379
|
+
</xsl:text>
|
|
1380
|
+
<xsl:call-template name="dom-type-inherits">
|
|
1381
|
+
<xsl:with-param name="typestring" select="@inherits"/>
|
|
1382
|
+
</xsl:call-template>
|
|
1383
|
+
</xsl:if>
|
|
1384
|
+
<xsl:text>
|
|
1385
|
+
�par
|
|
1386
|
+
</xsl:text>
|
|
1387
|
+
<xsl:apply-templates select="descr"/>
|
|
1388
|
+
<xsl:if test="count(attribute) > 0">
|
|
1389
|
+
<xsl:text>�paragraph{Attributes}</xsl:text>
|
|
1390
|
+
<xsl:text>�begin{description}</xsl:text>
|
|
1391
|
+
<xsl:apply-templates select="attribute"/>
|
|
1392
|
+
<xsl:text>�end{description}</xsl:text>
|
|
1393
|
+
</xsl:if>
|
|
1394
|
+
<xsl:if test="count(method) > 0">
|
|
1395
|
+
<xsl:text>�paragraph{Methods}</xsl:text>
|
|
1396
|
+
<xsl:text>�begin{description}</xsl:text>
|
|
1397
|
+
<xsl:apply-templates select="method"/>
|
|
1398
|
+
<xsl:text>�end{description}</xsl:text>
|
|
1399
|
+
</xsl:if>
|
|
1400
|
+
</xsl:template>
|
|
1401
|
+
|
|
1402
|
+
<xsl:template match="attribute">
|
|
1403
|
+
<xsl:text>�item[�DomAttName{</xsl:text>
|
|
1404
|
+
<xsl:value-of select="@name"/>
|
|
1405
|
+
<xsl:text>} of type </xsl:text>
|
|
1406
|
+
<xsl:call-template name="dom-type"/>
|
|
1407
|
+
<xsl:if test="@readonly='yes'">
|
|
1408
|
+
<xsl:text>, readonly</xsl:text>
|
|
1409
|
+
</xsl:if>
|
|
1410
|
+
<xsl:text>]</xsl:text>
|
|
1411
|
+
<xsl:apply-templates select="descr"/>
|
|
1412
|
+
<xsl:apply-templates select="setraises"/>
|
|
1413
|
+
<xsl:apply-templates select="getraises"/>
|
|
1414
|
+
</xsl:template>
|
|
1415
|
+
|
|
1416
|
+
|
|
1417
|
+
<xsl:template match="setraises[exception]">
|
|
1418
|
+
<xsl:text>�begin{description}</xsl:text>
|
|
1419
|
+
<xsl:apply-templates select="exception"/>
|
|
1420
|
+
<xsl:text>�end{description}</xsl:text>
|
|
1421
|
+
</xsl:template>
|
|
1422
|
+
|
|
1423
|
+
<xsl:template match="exception">
|
|
1424
|
+
<xsl:text>�item[</xsl:text>
|
|
1425
|
+
<xsl:value-of select="@name"/>
|
|
1426
|
+
<xsl:text>]</xsl:text>
|
|
1427
|
+
<xsl:apply-templates/>
|
|
1428
|
+
</xsl:template>
|
|
1429
|
+
|
|
1430
|
+
|
|
1431
|
+
<xsl:template match="descr">
|
|
1432
|
+
<xsl:apply-templates/>
|
|
1433
|
+
</xsl:template>
|
|
1434
|
+
|
|
1435
|
+
<xsl:template match="definitions">
|
|
1436
|
+
<xsl:apply-templates/>
|
|
1437
|
+
</xsl:template>
|
|
1438
|
+
|
|
1439
|
+
<xsl:template match="method">
|
|
1440
|
+
<xsl:text>�item[�DomMethodName{</xsl:text>
|
|
1441
|
+
<xsl:value-of select="@name"/>
|
|
1442
|
+
<xsl:text>}]�mbox{}�\</xsl:text>
|
|
1443
|
+
<xsl:apply-templates select="descr"/>
|
|
1444
|
+
<xsl:if test="count(parameters/param) > 0">
|
|
1445
|
+
<xsl:text>�par�textbf{Parameters}�par </xsl:text>
|
|
1446
|
+
<xsl:text>�begin{tabularx}{�linewidth}{llX}</xsl:text>
|
|
1447
|
+
<xsl:apply-templates select="parameters/param"/>
|
|
1448
|
+
<xsl:text>�end{tabularx}</xsl:text>
|
|
1449
|
+
</xsl:if>
|
|
1450
|
+
<xsl:apply-templates select="returns"/>
|
|
1451
|
+
<xsl:apply-templates select="raises"/>
|
|
1452
|
+
</xsl:template>
|
|
1453
|
+
|
|
1454
|
+
<xsl:template match="param">
|
|
1455
|
+
<xsl:call-template name="dom-type"/>
|
|
1456
|
+
<xsl:text>�tablecell �texttt{</xsl:text>
|
|
1457
|
+
<xsl:value-of select="@name"/>
|
|
1458
|
+
<xsl:text>}�tablecell </xsl:text>
|
|
1459
|
+
<xsl:apply-templates select="descr"/>
|
|
1460
|
+
<xsl:text>�tabularnewline</xsl:text>
|
|
1461
|
+
</xsl:template>
|
|
1462
|
+
|
|
1463
|
+
<xsl:template match="returns">
|
|
1464
|
+
<xsl:text>�par�textbf{Return value}�par </xsl:text>
|
|
1465
|
+
<xsl:text>�begin{tabularx}{�linewidth}{lX}</xsl:text>
|
|
1466
|
+
<xsl:call-template name="dom-type"/>
|
|
1467
|
+
<xsl:text>�tablecell </xsl:text>
|
|
1468
|
+
<xsl:apply-templates select="descr"/>
|
|
1469
|
+
<xsl:text>�end{tabularx}�par </xsl:text>
|
|
1470
|
+
</xsl:template>
|
|
1471
|
+
|
|
1472
|
+
<xsl:template name="dom-type-inherits">
|
|
1473
|
+
<xsl:param name="typestring"/>
|
|
1474
|
+
<xsl:choose>
|
|
1475
|
+
<xsl:when test="contains($typestring,',')">
|
|
1476
|
+
<xsl:call-template name="dom-type">
|
|
1477
|
+
<xsl:with-param name="type" select="normalize-space(substring-before($typestring,','))"/>
|
|
1478
|
+
</xsl:call-template>
|
|
1479
|
+
<xsl:text xml:space="preserve">, </xsl:text>
|
|
1480
|
+
<xsl:call-template name="dom-type-inherits">
|
|
1481
|
+
<xsl:with-param name="typestring" select="normalize-space(substring-after($typestring,','))"/>
|
|
1482
|
+
</xsl:call-template>
|
|
1483
|
+
</xsl:when>
|
|
1484
|
+
<xsl:otherwise>
|
|
1485
|
+
<xsl:call-template name="dom-type">
|
|
1486
|
+
<xsl:with-param name="type" select="$typestring"/>
|
|
1487
|
+
</xsl:call-template>
|
|
1488
|
+
</xsl:otherwise>
|
|
1489
|
+
</xsl:choose>
|
|
1490
|
+
</xsl:template>
|
|
1491
|
+
|
|
1492
|
+
<xsl:template name="dom-type">
|
|
1493
|
+
<xsl:param name="type" select="@type"/>
|
|
1494
|
+
<xsl:text>�texttt{</xsl:text>
|
|
1495
|
+
<xsl:choose>
|
|
1496
|
+
<xsl:when test="starts-with($type, 'MathML')">
|
|
1497
|
+
<xsl:text>�hyperref[</xsl:text
|
|
1498
|
+
>dom_<xsl:value-of select="substring-after($type, 'MathML')"/>
|
|
1499
|
+
<xsl:text>]</xsl:text>
|
|
1500
|
+
</xsl:when>
|
|
1501
|
+
<xsl:when test="$type = 'DOMString'">
|
|
1502
|
+
<xsl:text>�href{</xsl:text
|
|
1503
|
+
>http://www.w3.org/TR/DOM-Level-2-Core/core.html#DOMString<xsl:text
|
|
1504
|
+
>}</xsl:text>
|
|
1505
|
+
</xsl:when>
|
|
1506
|
+
<xsl:when test="$type = 'Document'">
|
|
1507
|
+
<xsl:text>�href{</xsl:text
|
|
1508
|
+
>http://www.w3.org/TR/DOM-Level-2-Core/core.html#i-Document<xsl:text
|
|
1509
|
+
>}</xsl:text>
|
|
1510
|
+
</xsl:when>
|
|
1511
|
+
<xsl:otherwise>
|
|
1512
|
+
<xsl:text>�href{</xsl:text
|
|
1513
|
+
>http://www.w3.org/TR/DOM-Level-2-Core/core.html<xsl:text
|
|
1514
|
+
>}</xsl:text>
|
|
1515
|
+
</xsl:otherwise>
|
|
1516
|
+
</xsl:choose>
|
|
1517
|
+
<xsl:text>{</xsl:text>
|
|
1518
|
+
<xsl:value-of select="$type"/>
|
|
1519
|
+
<xsl:text>}}</xsl:text>
|
|
1520
|
+
</xsl:template>
|
|
1521
|
+
|
|
1522
|
+
<xsl:template match="raises">
|
|
1523
|
+
<xsl:choose>
|
|
1524
|
+
<xsl:when test="count(exception) > 0">
|
|
1525
|
+
<xsl:text>�par�textbf{Exceptions}�par </xsl:text>
|
|
1526
|
+
<xsl:text>�begin{description}</xsl:text>
|
|
1527
|
+
<xsl:apply-templates select="exception"/>
|
|
1528
|
+
<xsl:text>�end{description}</xsl:text>
|
|
1529
|
+
</xsl:when>
|
|
1530
|
+
<xsl:otherwise>
|
|
1531
|
+
<xsl:text>This method raises no exceptions.�par </xsl:text>
|
|
1532
|
+
</xsl:otherwise>
|
|
1533
|
+
</xsl:choose>
|
|
1534
|
+
</xsl:template>
|
|
1535
|
+
|
|
1536
|
+
<xsl:template match="processing-instruction()">
|
|
1537
|
+
<xsl:choose>
|
|
1538
|
+
<xsl:when test="name(.)='generate-idl'">
|
|
1539
|
+
<xsl:text>�paragraph{IDL Definition}</xsl:text>
|
|
1540
|
+
<xsl:text>�begin{verbatim}�let �1</xsl:text>
|
|
1541
|
+
<xsl:apply-templates select="ancestor::interface" mode="idl"/>
|
|
1542
|
+
<xsl:apply-templates select="ancestor::interface/attribute" mode="idl"/>
|
|
1543
|
+
<xsl:apply-templates select="ancestor::interface/method" mode="idl"/>
|
|
1544
|
+
<xsl:text>};</xsl:text>
|
|
1545
|
+
<xsl:text>\end{verbatim}
|
|
1546
|
+
</xsl:text>
|
|
1547
|
+
</xsl:when>
|
|
1548
|
+
<xsl:when test="name(.)='include-dtd'">
|
|
1549
|
+
<xsl:text>�verbatiminput{../pubtext/mathml.dtd}</xsl:text>
|
|
1550
|
+
</xsl:when>
|
|
1551
|
+
<xsl:when test="name(.)='generate-binding'">
|
|
1552
|
+
<xsl:choose>
|
|
1553
|
+
<xsl:when test="parent::div2/@id='dom-bindings_IDLBinding'">
|
|
1554
|
+
<xsl:apply-templates select="key('id','mathml-dom')" mode="IDLInterfaces"/>
|
|
1555
|
+
<!-- UNCOMMENT NEXT LINE TO GENERATE IDL FILE IN THIS DIRECTORY -->
|
|
1556
|
+
<!-- <xsl:apply-templates select="key('id','mathml-dom')" mode="extFileIDLInterfaces"/> -->
|
|
1557
|
+
</xsl:when>
|
|
1558
|
+
<xsl:when test="parent::div2/@id='dom-bindings_JavaBindings'">
|
|
1559
|
+
<xsl:apply-templates select="key('id','mathml-dom')" mode="javaInterfaces"/>
|
|
1560
|
+
<!-- UNCOMMENT NEXT LINE TO GENERATE JAVA FILES IN DIRECTORY java/org/w3c/mathmldom -->
|
|
1561
|
+
<!-- <xsl:apply-templates select="key('id','mathml-dom')" mode="extFileJavaInterfaces"/> -->
|
|
1562
|
+
</xsl:when>
|
|
1563
|
+
<xsl:when test="parent::div2/@id='dom-bindings_ECMABinding'">
|
|
1564
|
+
<xsl:apply-templates select="key('id','mathml-dom')" mode="ecmaInterfaces"/>
|
|
1565
|
+
<!-- UNCOMMENT NEXT LINE TO GENERATE SEPARATE ECMASCRIPT BINDING FILE (HTML) -->
|
|
1566
|
+
<!-- <xsl:apply-templates select="key('id','mathml-dom')" mode="extFileEcmaInterfaces"/> -->
|
|
1567
|
+
</xsl:when>
|
|
1568
|
+
<xsl:otherwise>
|
|
1569
|
+
<xsl:text>�fbox{generate-binding processing instruction for unrecognized ID </xsl:text>
|
|
1570
|
+
<xsl:value-of select="parent::div2/@id"/>
|
|
1571
|
+
<xsl:text>}</xsl:text>
|
|
1572
|
+
</xsl:otherwise>
|
|
1573
|
+
</xsl:choose>
|
|
1574
|
+
</xsl:when>
|
|
1575
|
+
<xsl:when test="name(.)='generate-domInheritance'">
|
|
1576
|
+
<!-- <dl> -->
|
|
1577
|
+
<xsl:text>�begin{itemize}
</xsl:text>
|
|
1578
|
+
<xsl:apply-templates select="key('id','mathml-dom')//interface[not(starts-with(normalize-space(@inherits),'MathML'))]" mode="showInheritance"/>
|
|
1579
|
+
<!-- </dl> -->
|
|
1580
|
+
<xsl:text>�end{itemize}
</xsl:text>
|
|
1581
|
+
</xsl:when>
|
|
1582
|
+
<xsl:when test="name(.)='generate-elements-index'">
|
|
1583
|
+
<xsl:call-template name="index">
|
|
1584
|
+
<xsl:with-param name="a"
|
|
1585
|
+
select="//el[generate-id()=generate-id(key('elem',.))]"/>
|
|
1586
|
+
<xsl:with-param name="key" select="'elem'"/>
|
|
1587
|
+
</xsl:call-template>
|
|
1588
|
+
</xsl:when>
|
|
1589
|
+
<xsl:when test="name(.)='generate-attributes-index'">
|
|
1590
|
+
<xsl:call-template name="index">
|
|
1591
|
+
<xsl:with-param name="a"
|
|
1592
|
+
select="//att[generate-id()=generate-id(key('att',.))]"/>
|
|
1593
|
+
<xsl:with-param name="key" select="'att'"/>
|
|
1594
|
+
</xsl:call-template>
|
|
1595
|
+
</xsl:when>
|
|
1596
|
+
<xsl:otherwise>
|
|
1597
|
+
<xsl:text>�fbox{Unrecognised processing instruction </xsl:text>
|
|
1598
|
+
<xsl:value-of select="name(.)"/>
|
|
1599
|
+
<xsl:text>}</xsl:text>
|
|
1600
|
+
</xsl:otherwise>
|
|
1601
|
+
</xsl:choose>
|
|
1602
|
+
</xsl:template>
|
|
1603
|
+
|
|
1604
|
+
<xsl:key name="elem" match="el[not(@namespace) or @namespace='mathml']" use="."/>
|
|
1605
|
+
<xsl:key name="att" match="att[not(@namespace) or @namespace='mathml']" use="."/>
|
|
1606
|
+
|
|
1607
|
+
<xsl:template name="index">
|
|
1608
|
+
<xsl:param name="a"/>
|
|
1609
|
+
<xsl:param name="key"/>
|
|
1610
|
+
�begin{description}
|
|
1611
|
+
<xsl:for-each select="$a">
|
|
1612
|
+
<xsl:sort select="."/>
|
|
1613
|
+
<xsl:variable name="this" select="."/>
|
|
1614
|
+
�item[<xsl:value-of select="."/>]
|
|
1615
|
+
<xsl:for-each select="key($key,.)/ancestor::*[self::div1 or
|
|
1616
|
+
self::div2 or self::div3 or self::div4 or self::MMLdefinition][1]">
|
|
1617
|
+
<xsl:variable name="id">
|
|
1618
|
+
<xsl:choose>
|
|
1619
|
+
<xsl:when test="@id">
|
|
1620
|
+
<xsl:value-of select="@id"/>
|
|
1621
|
+
</xsl:when>
|
|
1622
|
+
<xsl:otherwise>
|
|
1623
|
+
<xsl:value-of select="generate-id(.)"/>
|
|
1624
|
+
</xsl:otherwise>
|
|
1625
|
+
</xsl:choose>
|
|
1626
|
+
</xsl:variable>
|
|
1627
|
+
<xsl:if test="head/el=$this
|
|
1628
|
+
or self::div4[@id='contm_trig']/p[1]/table/tbody/tr/td/el=$this
|
|
1629
|
+
or (head='Description' and ($this='none' or $this='mprescripts'))">
|
|
1630
|
+
<xsl:text>�textbf</xsl:text>
|
|
1631
|
+
</xsl:if>
|
|
1632
|
+
<xsl:text/>{�ref{<xsl:value-of select="$id"/>}}<xsl:text/>
|
|
1633
|
+
<xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
|
|
1634
|
+
</xsl:for-each>
|
|
1635
|
+
|
|
1636
|
+
</xsl:for-each>
|
|
1637
|
+
�end{description}
|
|
1638
|
+
</xsl:template>
|
|
1639
|
+
|
|
1640
|
+
|
|
1641
|
+
|
|
1642
|
+
<xsl:template match="interface" mode="idl">
|
|
1643
|
+
<xsl:text>interface </xsl:text>
|
|
1644
|
+
<xsl:value-of select="@name"/>
|
|
1645
|
+
<xsl:if test="string-length(normalize-space(@inherits))>0">
|
|
1646
|
+
<xsl:text>: </xsl:text>
|
|
1647
|
+
<xsl:value-of select="@inherits"/>
|
|
1648
|
+
</xsl:if>
|
|
1649
|
+
<xsl:text> {
|
|
1650
|
+
</xsl:text>
|
|
1651
|
+
</xsl:template>
|
|
1652
|
+
|
|
1653
|
+
<xsl:template match="attribute" mode="idl">
|
|
1654
|
+
<xsl:text xml:space="preserve"> </xsl:text>
|
|
1655
|
+
<xsl:if test="@readonly='yes'">
|
|
1656
|
+
<xsl:text>readonly </xsl:text>
|
|
1657
|
+
</xsl:if>
|
|
1658
|
+
<xsl:text>attribute </xsl:text>
|
|
1659
|
+
<xsl:value-of select="@type"/>
|
|
1660
|
+
<xsl:text xml:space="preserve"> </xsl:text>
|
|
1661
|
+
<xsl:value-of select="@name"/>
|
|
1662
|
+
<xsl:text>;
|
|
1663
|
+
</xsl:text>
|
|
1664
|
+
</xsl:template>
|
|
1665
|
+
|
|
1666
|
+
<xsl:template match="method" mode="idl">
|
|
1667
|
+
<xsl:text xml:space="preserve"> </xsl:text>
|
|
1668
|
+
<xsl:value-of select="returns/@type"/>
|
|
1669
|
+
<xsl:text xml:space="preserve"> </xsl:text>
|
|
1670
|
+
<xsl:value-of select="@name"/>
|
|
1671
|
+
<xsl:text>(</xsl:text>
|
|
1672
|
+
<xsl:apply-templates select="parameters/param" mode="idl"/>
|
|
1673
|
+
<xsl:text>);
|
|
1674
|
+
</xsl:text>
|
|
1675
|
+
</xsl:template>
|
|
1676
|
+
|
|
1677
|
+
<xsl:template match="param" mode="idl">
|
|
1678
|
+
<xsl:if test="position() > 1">, </xsl:if>
|
|
1679
|
+
<xsl:choose>
|
|
1680
|
+
<xsl:when test="@attr">
|
|
1681
|
+
<xsl:value-of select="@attr"/>
|
|
1682
|
+
<xsl:text xml:space="preserve"> </xsl:text>
|
|
1683
|
+
</xsl:when>
|
|
1684
|
+
<xsl:otherwise>
|
|
1685
|
+
<xsl:text>inout </xsl:text>
|
|
1686
|
+
</xsl:otherwise>
|
|
1687
|
+
</xsl:choose>
|
|
1688
|
+
<xsl:value-of select="@type"/>
|
|
1689
|
+
<xsl:text xml:space="preserve"> </xsl:text>
|
|
1690
|
+
<xsl:value-of select="@name"/>
|
|
1691
|
+
</xsl:template>
|
|
1692
|
+
|
|
1693
|
+
<!-- Default template (primarily for debugging purposes) -->
|
|
1694
|
+
<xsl:template match="*">
|
|
1695
|
+
<xsl:message>
|
|
1696
|
+
unknown element <xsl:value-of select="name()"/>
|
|
1697
|
+
<xsl:for-each select="@*">[<xsl:value-of select="name()"/>="<xsl:value-of select="."/>"]</xsl:for-each>
|
|
1698
|
+
</xsl:message>
|
|
1699
|
+
<xsl:text>�fbox{<</xsl:text>
|
|
1700
|
+
<xsl:value-of select="name(.)"/>
|
|
1701
|
+
<xsl:text>>}</xsl:text>
|
|
1702
|
+
<xsl:apply-templates/>
|
|
1703
|
+
<xsl:text>�fbox{</</xsl:text>
|
|
1704
|
+
<xsl:value-of select="name(.)"/>
|
|
1705
|
+
<xsl:text>>}</xsl:text>
|
|
1706
|
+
</xsl:template>
|
|
1707
|
+
|
|
1708
|
+
|
|
1709
|
+
|
|
1710
|
+
<xsl:template match="key('id','presm_maction')//gitem/label" priority="2">
|
|
1711
|
+
<xsl:text>�item[{�parbox[t]{�textwidth}{</xsl:text>
|
|
1712
|
+
<xsl:apply-templates/>
|
|
1713
|
+
<xsl:text>}}] </xsl:text>
|
|
1714
|
+
</xsl:template>
|
|
1715
|
+
|
|
1716
|
+
|
|
1717
|
+
|
|
1718
|
+
<!--
|
|
1719
|
+
<xsl:template match="key('id','parsing:dtd')/eg" priority="2">
|
|
1720
|
+
<xsl:text>�begin{verbatim}�catcode123=1�catcode125=2�relax</xsl:text>
|
|
1721
|
+
<xsl:apply-templates/>
|
|
1722
|
+
<xsl:text>�catcode123=12�catcode125=12�relax
|
|
1723
|
+
\end{verbatim}</xsl:text>
|
|
1724
|
+
</xsl:template>
|
|
1725
|
+
-->
|
|
1726
|
+
|
|
1727
|
+
|
|
1728
|
+
|
|
1729
|
+
<!-- appendix c -->
|
|
1730
|
+
|
|
1731
|
+
|
|
1732
|
+
<xsl:template match="MMLdefinition">
|
|
1733
|
+
<xsl:text>�subsubsection{MMLdefinition:
|
|
1734
|
+
�texttt{</xsl:text><xsl:value-of select="name"/>
|
|
1735
|
+
<xsl:text>}</xsl:text>
|
|
1736
|
+
<xsl:call-template name="makeanchor"/>
|
|
1737
|
+
<xsl:text>}
|
|
1738
|
+
�begin{description}
|
|
1739
|
+
</xsl:text>
|
|
1740
|
+
|
|
1741
|
+
<xsl:apply-templates select="description"/>
|
|
1742
|
+
|
|
1743
|
+
<xsl:apply-templates select="classification"/>
|
|
1744
|
+
|
|
1745
|
+
<xsl:if test="MMLattribute">
|
|
1746
|
+
<xsl:text>�item[MMLattribute]�mbox{}�\
|
|
1747
|
+
�begin{tabularx}{�linewidth}{lXl}
|
|
1748
|
+
Name�tablecell Value�tablecell Default�\
|
|
1749
|
+
�hline
|
|
1750
|
+
</xsl:text>
|
|
1751
|
+
<xsl:for-each select="MMLattribute">
|
|
1752
|
+
<xsl:apply-templates/><xsl:text>�\</xsl:text>
|
|
1753
|
+
</xsl:for-each>
|
|
1754
|
+
<xsl:text>�end{tabularx}
|
|
1755
|
+
</xsl:text>
|
|
1756
|
+
</xsl:if>
|
|
1757
|
+
|
|
1758
|
+
<xsl:if test="signature">
|
|
1759
|
+
<xsl:text>�item[Signature]</xsl:text>
|
|
1760
|
+
<xsl:for-each select="signature">
|
|
1761
|
+
<xsl:value-of select="."/><xsl:text>�par </xsl:text>
|
|
1762
|
+
</xsl:for-each>
|
|
1763
|
+
</xsl:if>
|
|
1764
|
+
|
|
1765
|
+
|
|
1766
|
+
<xsl:apply-templates select="property|MMLexample"/>
|
|
1767
|
+
|
|
1768
|
+
<xsl:text>�end{description}</xsl:text>
|
|
1769
|
+
|
|
1770
|
+
</xsl:template>
|
|
1771
|
+
|
|
1772
|
+
|
|
1773
|
+
|
|
1774
|
+
<xsl:template match="MMLexample">
|
|
1775
|
+
<xsl:text>�item[Example]</xsl:text>
|
|
1776
|
+
<xsl:apply-templates select="description"/>
|
|
1777
|
+
<xsl:text>�begin{verbatim}</xsl:text>
|
|
1778
|
+
<xsl:apply-templates select="text()"/>
|
|
1779
|
+
<xsl:text>\end{verbatim}
|
|
1780
|
+
</xsl:text>
|
|
1781
|
+
</xsl:template>
|
|
1782
|
+
|
|
1783
|
+
<xsl:template match="classification">
|
|
1784
|
+
<xsl:text>�item[Classification]</xsl:text>
|
|
1785
|
+
<xsl:apply-templates/>
|
|
1786
|
+
</xsl:template>
|
|
1787
|
+
|
|
1788
|
+
|
|
1789
|
+
<xsl:template match="attvalue|attname">
|
|
1790
|
+
<xsl:apply-templates/><xsl:text>�tablecell</xsl:text>
|
|
1791
|
+
</xsl:template>
|
|
1792
|
+
<xsl:template match="attdefault">
|
|
1793
|
+
<xsl:apply-templates/>
|
|
1794
|
+
</xsl:template>
|
|
1795
|
+
|
|
1796
|
+
|
|
1797
|
+
<xsl:template match="property">
|
|
1798
|
+
<xsl:text>�item[Property]</xsl:text>
|
|
1799
|
+
<xsl:apply-templates select="description"/>
|
|
1800
|
+
<xsl:text>�begin{verbatim}</xsl:text>
|
|
1801
|
+
<xsl:apply-templates select="text()"/>
|
|
1802
|
+
<xsl:text>\end{verbatim}
|
|
1803
|
+
</xsl:text>
|
|
1804
|
+
</xsl:template>
|
|
1805
|
+
|
|
1806
|
+
<xsl:template match="description">
|
|
1807
|
+
<xsl:text>�item[Description]</xsl:text>
|
|
1808
|
+
<xsl:apply-templates/>
|
|
1809
|
+
</xsl:template>
|
|
1810
|
+
|
|
1811
|
+
|
|
1812
|
+
<xsl:template match="MMLdefinition/name"/>
|
|
1813
|
+
|
|
1814
|
+
|
|
1815
|
+
<xsl:template match="MMLdefinition/functorclass"/>
|
|
1816
|
+
|
|
1817
|
+
|
|
1818
|
+
<xsl:template match="MMLdefinition/signature"/>
|
|
1819
|
+
|
|
1820
|
+
|
|
1821
|
+
|
|
1822
|
+
<xsl:template match="MMLdefinition/description">
|
|
1823
|
+
<xsl:text>�item[Description]</xsl:text>
|
|
1824
|
+
<xsl:apply-templates/>
|
|
1825
|
+
<xsl:text>�par See also </xsl:text>
|
|
1826
|
+
<xsl:variable name="x"
|
|
1827
|
+
select="key('id',concat('contm_',normalize-space(preceding-sibling::name)))"/>
|
|
1828
|
+
<xsl:for-each select="$x|key('id','contm_trig')[not($x)]">
|
|
1829
|
+
<xsl:call-template name="makeref"/>
|
|
1830
|
+
</xsl:for-each><xsl:text>.�par</xsl:text>
|
|
1831
|
+
</xsl:template>
|
|
1832
|
+
|
|
1833
|
+
<!-- IDL, Java, ECMAScript Bindings for DOM -->
|
|
1834
|
+
|
|
1835
|
+
<!-- Constant and Indentation String variables: -->
|
|
1836
|
+
|
|
1837
|
+
<xsl:variable name="lowerCaseString"><xsl:text>abcdefghijklmnopqrstuvwxyz</xsl:text></xsl:variable>
|
|
1838
|
+
<xsl:variable name="upperCaseString"><xsl:text>ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:text></xsl:variable>
|
|
1839
|
+
|
|
1840
|
+
<xsl:variable name="IDLindent0"><xsl:text>
</xsl:text>
|
|
1841
|
+
</xsl:variable>
|
|
1842
|
+
|
|
1843
|
+
<xsl:variable name="IDLindent1"><xsl:text xml:space="preserve">
 </xsl:text>
|
|
1844
|
+
</xsl:variable>
|
|
1845
|
+
|
|
1846
|
+
<xsl:variable name="IDLindent2"><xsl:text xml:space="preserve">
 </xsl:text>
|
|
1847
|
+
</xsl:variable>
|
|
1848
|
+
|
|
1849
|
+
<xsl:variable name="IDLindent3"><xsl:text xml:space="preserve">
 </xsl:text>
|
|
1850
|
+
</xsl:variable>
|
|
1851
|
+
|
|
1852
|
+
<xsl:variable name="IDLindent4"><xsl:text xml:space="preserve">
 </xsl:text>
|
|
1853
|
+
</xsl:variable>
|
|
1854
|
+
|
|
1855
|
+
<xsl:variable name="IDLindent5"><xsl:text xml:space="preserve">
 </xsl:text>
|
|
1856
|
+
</xsl:variable>
|
|
1857
|
+
|
|
1858
|
+
<xsl:variable name="raisesIndent"><xsl:text xml:space="preserve">
 </xsl:text>
|
|
1859
|
+
</xsl:variable>
|
|
1860
|
+
|
|
1861
|
+
<xsl:variable name="javaRaisesIndent"><xsl:text xml:space="preserve">
 </xsl:text>
|
|
1862
|
+
</xsl:variable>
|
|
1863
|
+
|
|
1864
|
+
<xsl:variable name="javaPackageDeclaration"><xsl:text xml:space="preserve">
|
|
1865
|
+
package org.w3c.dom.mathml;
</xsl:text>
|
|
1866
|
+
</xsl:variable>
|
|
1867
|
+
|
|
1868
|
+
<xsl:variable name="idlFileHeader">
|
|
1869
|
+
<xsl:text xml:space="preserve">
|
|
1870
|
+
|
|
1871
|
+
// File: mathml-dom.idl
|
|
1872
|
+
#ifndef _MATHMLDOM_IDL_
|
|
1873
|
+
#define _MATHMLDOM_IDL_
|
|
1874
|
+
|
|
1875
|
+
#include "dom.idl"
|
|
1876
|
+
|
|
1877
|
+
#pragma prefix "w3c.org"
|
|
1878
|
+
|
|
1879
|
+
module mathml_dom
|
|
1880
|
+
{</xsl:text>
|
|
1881
|
+
</xsl:variable>
|
|
1882
|
+
|
|
1883
|
+
<xsl:variable name="idlFileFooter">
|
|
1884
|
+
<xsl:text xml:space="preserve">
};

#endif</xsl:text>
|
|
1885
|
+
</xsl:variable>
|
|
1886
|
+
|
|
1887
|
+
<!-- IDL Binding -->
|
|
1888
|
+
|
|
1889
|
+
<xsl:template match="div1[@id='mathml-dom']" mode="IDLInterfaces">
|
|
1890
|
+
<xsl:text>�begin{verbatim}</xsl:text>
|
|
1891
|
+
<xsl:value-of select="$idlFileHeader"/>
|
|
1892
|
+
<xsl:apply-templates mode="IDLgetForwardDeclarations"/>
|
|
1893
|
+
<xsl:value-of select="$IDLindent1"/>
|
|
1894
|
+
<xsl:apply-templates mode="IDLInterfaces"/>
|
|
1895
|
+
<xsl:value-of select="$idlFileFooter"/>
|
|
1896
|
+
<xsl:text>\end{verbatim}</xsl:text>
|
|
1897
|
+
</xsl:template>
|
|
1898
|
+
|
|
1899
|
+
<!-- IDL GetForwardDeclarations templates -->
|
|
1900
|
+
|
|
1901
|
+
<xsl:template mode="IDLgetForwardDeclarations" match="interface|constant[not(ancestor::interface)]">
|
|
1902
|
+
<xsl:variable name="thisInterface" select="@name"/>
|
|
1903
|
+
<xsl:if test="count(ancestor-or-self::*[ancestor::div1[@id='mathml-dom']]/preceding-sibling::*/descendant-or-self::*[(interface[normalize-space(@inherits)=$thisInterface]) or (param|attribute|returns)[normalize-space(@type)=$thisInterface]])>0">
|
|
1904
|
+
<xsl:value-of select="$IDLindent1"/>
|
|
1905
|
+
<xsl:text xml:space="preserve">interface </xsl:text>
|
|
1906
|
+
<xsl:value-of select="@name"/>
|
|
1907
|
+
<xsl:text>;</xsl:text>
|
|
1908
|
+
</xsl:if>
|
|
1909
|
+
</xsl:template>
|
|
1910
|
+
|
|
1911
|
+
<xsl:template mode="IDLgetForwardDeclarations" match="*">
|
|
1912
|
+
<xsl:apply-templates mode="IDLgetForwardDeclarations"/>
|
|
1913
|
+
</xsl:template>
|
|
1914
|
+
|
|
1915
|
+
<xsl:template mode="IDLgetForwardDeclarations" match="text()">
|
|
1916
|
+
</xsl:template>
|
|
1917
|
+
|
|
1918
|
+
|
|
1919
|
+
<!-- IDLInterfaces templates -->
|
|
1920
|
+
|
|
1921
|
+
<xsl:template match="interface" mode="IDLInterfaces">
|
|
1922
|
+
<xsl:value-of select="$IDLindent1"/>
|
|
1923
|
+
<xsl:text xml:space="preserve">interface </xsl:text>
|
|
1924
|
+
<xsl:value-of select="@name"/>
|
|
1925
|
+
<xsl:if test="string-length(normalize-space(@inherits))>0">
|
|
1926
|
+
<xsl:text xml:space="preserve"> : </xsl:text>
|
|
1927
|
+
<xsl:value-of select="@inherits"/>
|
|
1928
|
+
</xsl:if>
|
|
1929
|
+
<xsl:value-of select="$IDLindent1"/>
|
|
1930
|
+
<xsl:text>{</xsl:text>
|
|
1931
|
+
<xsl:apply-templates mode="IDLInterfaces"/>
|
|
1932
|
+
<xsl:value-of select="$IDLindent1"/>
|
|
1933
|
+
<xsl:text xml:space="preserve">};
|
|
1934
|
+
</xsl:text>
|
|
1935
|
+
</xsl:template>
|
|
1936
|
+
|
|
1937
|
+
<xsl:template match="constant" mode="IDLInterfaces">
|
|
1938
|
+
<xsl:value-of select="$IDLindent2"/>const <xsl:value-of select="@type"/>
|
|
1939
|
+
<xsl:value-of select="substring(' ',string-length(@type)+1)"/>
|
|
1940
|
+
<xsl:value-of select="@name"/>
|
|
1941
|
+
<xsl:value-of select="substring(' ',string-length(@name)+1)"/>
|
|
1942
|
+
<xsl:text xml:space="preserve">= </xsl:text><xsl:value-of select="@value"/><xsl:text>;</xsl:text>
|
|
1943
|
+
</xsl:template>
|
|
1944
|
+
|
|
1945
|
+
<xsl:template match="attribute" mode="IDLInterfaces">
|
|
1946
|
+
<xsl:value-of select="$IDLindent2"/>
|
|
1947
|
+
<xsl:choose>
|
|
1948
|
+
<xsl:when test="normalize-space(@readonly)='yes'"><xsl:text xml:space="preserve">readonly </xsl:text></xsl:when>
|
|
1949
|
+
<xsl:otherwise><xsl:text xml:space="preserve"> </xsl:text></xsl:otherwise>
|
|
1950
|
+
</xsl:choose>
|
|
1951
|
+
<xsl:text xml:space="preserve">attribute </xsl:text>
|
|
1952
|
+
<xsl:value-of select="@type"/>
|
|
1953
|
+
<xsl:value-of select="substring(' ',string-length(@type)+1)"/>
|
|
1954
|
+
<xsl:text xml:space="preserve"> </xsl:text><xsl:value-of select="@name"/><xsl:text>;</xsl:text>
|
|
1955
|
+
<xsl:apply-templates select="raises|setraises|getraises" mode="IDLInterfaces"/>
|
|
1956
|
+
</xsl:template>
|
|
1957
|
+
|
|
1958
|
+
<xsl:template match="method" mode="IDLInterfaces">
|
|
1959
|
+
<xsl:value-of select="$IDLindent2"/>
|
|
1960
|
+
<xsl:value-of select="returns/@type"/>
|
|
1961
|
+
<xsl:value-of select="substring(' ',string-length(returns/@type)+1)"/>
|
|
1962
|
+
<xsl:text xml:space="preserve"> </xsl:text>
|
|
1963
|
+
<xsl:value-of select="@name"/><xsl:text>(</xsl:text>
|
|
1964
|
+
<xsl:apply-templates select="parameters" mode="IDLInterfaces"/>
|
|
1965
|
+
<xsl:text>)</xsl:text>
|
|
1966
|
+
<xsl:apply-templates select="raises" mode="IDLInterfaces"/>
|
|
1967
|
+
<xsl:text>;</xsl:text>
|
|
1968
|
+
</xsl:template>
|
|
1969
|
+
|
|
1970
|
+
<xsl:template match="parameters" mode="IDLInterfaces">
|
|
1971
|
+
<xsl:variable name="localParent"><xsl:value-of select="ancestor::method/@name"/></xsl:variable>
|
|
1972
|
+
<xsl:variable name="localParamIndent"><xsl:value-of select="$IDLindent2"/>
|
|
1973
|
+
<xsl:text xml:space="preserve"> </xsl:text>
|
|
1974
|
+
<xsl:value-of select="substring(' ',1,string-length($localParent)+2)"/>
|
|
1975
|
+
</xsl:variable>
|
|
1976
|
+
<xsl:for-each select="param">
|
|
1977
|
+
<xsl:if test="count(preceding-sibling::param)>0">
|
|
1978
|
+
<xsl:text>,</xsl:text>
|
|
1979
|
+
<xsl:value-of select="$localParamIndent"/>
|
|
1980
|
+
</xsl:if>
|
|
1981
|
+
<xsl:value-of select="./@attr"/><xsl:text xml:space="preserve"> </xsl:text>
|
|
1982
|
+
<xsl:value-of select="./@type"/><xsl:text xml:space="preserve"> </xsl:text>
|
|
1983
|
+
<xsl:value-of select="./@name"/>
|
|
1984
|
+
</xsl:for-each>
|
|
1985
|
+
</xsl:template>
|
|
1986
|
+
|
|
1987
|
+
<xsl:template match="raises" mode="IDLInterfaces">
|
|
1988
|
+
<xsl:if test="count(exception)>0">
|
|
1989
|
+
<xsl:value-of select="$raisesIndent"/><xsl:text xml:space="preserve">raises(</xsl:text>
|
|
1990
|
+
<xsl:for-each select="exception">
|
|
1991
|
+
<xsl:variable name="localExceptionName" select="@name"/>
|
|
1992
|
+
<xsl:if test="count(preceding-sibling::exception[normalize-space(@name)=$localExceptionName])=0">
|
|
1993
|
+
<xsl:if test="count(preceding-sibling::exception[not(normalize-space(@name)=$localExceptionName)])!=0">
|
|
1994
|
+
<xsl:text>,</xsl:text>
|
|
1995
|
+
<xsl:value-of select="$raisesIndent"/>
|
|
1996
|
+
</xsl:if>
|
|
1997
|
+
<xsl:value-of select="$localExceptionName"/>
|
|
1998
|
+
</xsl:if>
|
|
1999
|
+
</xsl:for-each>
|
|
2000
|
+
<xsl:text>)</xsl:text>
|
|
2001
|
+
</xsl:if>
|
|
2002
|
+
</xsl:template>
|
|
2003
|
+
|
|
2004
|
+
<xsl:template match="setraises" mode="IDLInterfaces">
|
|
2005
|
+
<xsl:for-each select="exception">
|
|
2006
|
+
<xsl:variable name="localExceptionName" select="@name"/>
|
|
2007
|
+
<xsl:if test="count(preceding-sibling::exception[normalize-space(@name)=$localExceptionName])=0">
|
|
2008
|
+
<xsl:value-of select="$raisesIndent"/><xsl:text xml:space="preserve">// raises(</xsl:text>
|
|
2009
|
+
<xsl:value-of select="$localExceptionName"/><xsl:text xml:space="preserve">) on setting</xsl:text>
|
|
2010
|
+
</xsl:if>
|
|
2011
|
+
</xsl:for-each>
|
|
2012
|
+
</xsl:template>
|
|
2013
|
+
|
|
2014
|
+
<xsl:template match="getraises" mode="IDLInterfaces">
|
|
2015
|
+
<xsl:for-each select="exception">
|
|
2016
|
+
<xsl:variable name="localExceptionName" select="@name"/>
|
|
2017
|
+
<xsl:if test="count(preceding-sibling::exception[normalize-space(@name)=$localExceptionName])=0">
|
|
2018
|
+
<xsl:value-of select="$raisesIndent"/><xsl:text xml:space="preserve">// raises(</xsl:text>
|
|
2019
|
+
<xsl:value-of select="$localExceptionName"/><xsl:text xml:space="preserve">) on retrieval</xsl:text>
|
|
2020
|
+
</xsl:if>
|
|
2021
|
+
</xsl:for-each>
|
|
2022
|
+
</xsl:template>
|
|
2023
|
+
|
|
2024
|
+
<xsl:template match="text()" mode="IDLInterfaces">
|
|
2025
|
+
</xsl:template>
|
|
2026
|
+
|
|
2027
|
+
<xsl:template match="*" mode="IDLInterfaces">
|
|
2028
|
+
<xsl:apply-templates mode="IDLInterfaces"/>
|
|
2029
|
+
</xsl:template>
|
|
2030
|
+
|
|
2031
|
+
|
|
2032
|
+
<!-- Java Binding -->
|
|
2033
|
+
|
|
2034
|
+
<xsl:template match="div1[@id='mathml-dom']" mode="javaInterfaces">
|
|
2035
|
+
<xsl:apply-templates mode="javaInterfaces" select=".//interface"/>
|
|
2036
|
+
</xsl:template>
|
|
2037
|
+
|
|
2038
|
+
<xsl:template match="div1[@id='mathml-dom']" mode="extFileJavaInterfaces">
|
|
2039
|
+
<xsl:apply-templates mode="extFileJavaInterfaces" select=".//interface"/>
|
|
2040
|
+
</xsl:template>
|
|
2041
|
+
|
|
2042
|
+
<!-- JavaFileHeader -->
|
|
2043
|
+
|
|
2044
|
+
<xsl:template name="javaFileHeader">
|
|
2045
|
+
<xsl:value-of select="$javaPackageDeclaration"/>
|
|
2046
|
+
<xsl:for-each select=".//attribute/@type|.//param/@type|.//returns/@type|@inherits|.//exception/@name">
|
|
2047
|
+
<xsl:apply-templates mode="javaGetExternalDeclarations" select="."/>
|
|
2048
|
+
</xsl:for-each>
|
|
2049
|
+
</xsl:template>
|
|
2050
|
+
|
|
2051
|
+
<xsl:template mode="javaGetExternalDeclarations" match="text()">
|
|
2052
|
+
</xsl:template>
|
|
2053
|
+
|
|
2054
|
+
<xsl:template mode="javaGetExternalDeclarations" match="@*">
|
|
2055
|
+
<xsl:variable name="targetType" select="normalize-space(.)"/>
|
|
2056
|
+
<xsl:if test="not(starts-with($targetType,'MathML') or $targetType='void' or $targetType='long' or $targetType='unsigned long' or $targetType='short' or $targetType='unsigned short' or $targetType='DOMString' or $targetType='boolean')">
|
|
2057
|
+
<xsl:variable name="localInterfaceParent" select="normalize-space(ancestor::interface/@name)"/>
|
|
2058
|
+
<xsl:variable name="firstCount" select="count(ancestor-or-self::*[ancestor::interface[normalize-space(@name)=$localInterfaceParent]]/preceding-sibling::*/descendant-or-self::*[self::attribute|self::returns|self::constant|self::param][normalize-space(@type)=$targetType])"/>
|
|
2059
|
+
<xsl:variable name="secondCount" select="count(ancestor-or-self::*[ancestor::interface[normalize-space(@name)=$localInterfaceParent]]/preceding-sibling::*/descendant-or-self::exception[normalize-space(@name)=$targetType])"/>
|
|
2060
|
+
<xsl:if test="not(normalize-space(ancestor::interface[@inherits])=$targetType) and $firstCount=0 and $secondCount=0">
|
|
2061
|
+
<xsl:call-template name="javaImportExternal">
|
|
2062
|
+
<xsl:with-param name="theSource">dom</xsl:with-param>
|
|
2063
|
+
<xsl:with-param name="theEntity" select="$targetType"/>
|
|
2064
|
+
</xsl:call-template>
|
|
2065
|
+
</xsl:if>
|
|
2066
|
+
</xsl:if>
|
|
2067
|
+
</xsl:template>
|
|
2068
|
+
|
|
2069
|
+
<xsl:template name="javaImportExternal">
|
|
2070
|
+
<xsl:param name="theSource"/>
|
|
2071
|
+
<xsl:param name="theEntity"/>
|
|
2072
|
+
<xsl:if test="string-length(normalize-space($theEntity))>0 and string-length(normalize-space($theSource))>0">
|
|
2073
|
+
<xsl:text xml:space="preserve">
import org.w3c.</xsl:text><xsl:value-of select="$theSource"/>
|
|
2074
|
+
<xsl:text>.</xsl:text>
|
|
2075
|
+
<xsl:value-of select="$theEntity"/>
|
|
2076
|
+
<xsl:text>;</xsl:text>
|
|
2077
|
+
</xsl:if>
|
|
2078
|
+
</xsl:template>
|
|
2079
|
+
|
|
2080
|
+
<!-- javaInterfaces Templates -->
|
|
2081
|
+
|
|
2082
|
+
<xsl:template match="interface" mode="javaInterfaces">
|
|
2083
|
+
<xsl:text>�subsection{org/w3c/mathmldom/</xsl:text>
|
|
2084
|
+
<xsl:value-of select="@name"/><xsl:text>.java}</xsl:text>
|
|
2085
|
+
<xsl:text>�begin{verbatim}�let �1
</xsl:text>
|
|
2086
|
+
<xsl:call-template name="javaFileHeader" />
|
|
2087
|
+
<xsl:value-of select="$IDLindent0"/>
|
|
2088
|
+
<xsl:value-of select="$IDLindent0"/>
|
|
2089
|
+
<xsl:text xml:space="preserve">public interface </xsl:text>
|
|
2090
|
+
<xsl:value-of select="@name"/>
|
|
2091
|
+
<xsl:if test="string-length(normalize-space(@inherits))>0">
|
|
2092
|
+
<xsl:text xml:space="preserve"> extends </xsl:text>
|
|
2093
|
+
<xsl:value-of select="@inherits"/>
|
|
2094
|
+
</xsl:if>
|
|
2095
|
+
<xsl:value-of select="$IDLindent0"/>
|
|
2096
|
+
<xsl:text>{</xsl:text>
|
|
2097
|
+
<xsl:apply-templates mode="javaInterfaces"/>
|
|
2098
|
+
<xsl:value-of select="$IDLindent0"/>
|
|
2099
|
+
<xsl:text xml:space="preserve">};
\end{verbatim}
</xsl:text>
|
|
2100
|
+
</xsl:template>
|
|
2101
|
+
|
|
2102
|
+
<xsl:template name="javaTranslateTypeName">
|
|
2103
|
+
<xsl:param name="targetType" select="normalize-space(@type)"/>
|
|
2104
|
+
<xsl:choose>
|
|
2105
|
+
<xsl:when test="$targetType='DOMString'">
|
|
2106
|
+
<xsl:text>String</xsl:text>
|
|
2107
|
+
</xsl:when>
|
|
2108
|
+
<xsl:when test="$targetType='unsigned long' or $targetType='long'">
|
|
2109
|
+
<xsl:text>int</xsl:text>
|
|
2110
|
+
</xsl:when>
|
|
2111
|
+
<xsl:otherwise>
|
|
2112
|
+
<xsl:value-of select="$targetType"/>
|
|
2113
|
+
</xsl:otherwise>
|
|
2114
|
+
</xsl:choose>
|
|
2115
|
+
</xsl:template>
|
|
2116
|
+
|
|
2117
|
+
<xsl:template name="javaTranslateProcName">
|
|
2118
|
+
<xsl:param name="whichMode" select="get"/>
|
|
2119
|
+
<xsl:param name="attribName" select="normalize-space(@name)"/>
|
|
2120
|
+
<xsl:choose>
|
|
2121
|
+
<xsl:when test="$whichMode='set'">
|
|
2122
|
+
<xsl:text>set</xsl:text>
|
|
2123
|
+
</xsl:when>
|
|
2124
|
+
<xsl:otherwise>
|
|
2125
|
+
<xsl:text>get</xsl:text>
|
|
2126
|
+
</xsl:otherwise>
|
|
2127
|
+
</xsl:choose>
|
|
2128
|
+
<xsl:value-of select="translate(substring($attribName,1,1),$lowerCaseString,$upperCaseString)"/>
|
|
2129
|
+
<xsl:value-of select="substring($attribName,2)"/>
|
|
2130
|
+
</xsl:template>
|
|
2131
|
+
|
|
2132
|
+
<xsl:template match="constant" mode="javaInterfaces">
|
|
2133
|
+
<xsl:value-of select="$IDLindent2"/><xsl:text xml:space="preserve">public static final </xsl:text>
|
|
2134
|
+
<xsl:variable name="javaTypeName">
|
|
2135
|
+
<xsl:call-template name="javaTranslateTypeName">
|
|
2136
|
+
<xsl:with-param name="targetType" select="@type"/>
|
|
2137
|
+
</xsl:call-template>
|
|
2138
|
+
</xsl:variable>
|
|
2139
|
+
<xsl:value-of select="$javaTypeName"/>
|
|
2140
|
+
<xsl:value-of select="substring(' ',string-length($javaTypeName)+1)"/>
|
|
2141
|
+
<xsl:value-of select="@name"/>
|
|
2142
|
+
<xsl:value-of select="substring(' ',string-length(@name)+1)"/>
|
|
2143
|
+
<xsl:text xml:space="preserve">= </xsl:text><xsl:value-of select="@value"/><xsl:text>;</xsl:text>
|
|
2144
|
+
</xsl:template>
|
|
2145
|
+
|
|
2146
|
+
<xsl:template match="attribute" mode="javaInterfaces">
|
|
2147
|
+
<xsl:value-of select="$IDLindent2"/><xsl:text xml:space="preserve">public </xsl:text>
|
|
2148
|
+
<xsl:variable name="javaTypeName">
|
|
2149
|
+
<xsl:call-template name="javaTranslateTypeName">
|
|
2150
|
+
<xsl:with-param name="targetType" select="@type"/>
|
|
2151
|
+
</xsl:call-template>
|
|
2152
|
+
</xsl:variable>
|
|
2153
|
+
<xsl:value-of select="$javaTypeName"/>
|
|
2154
|
+
<xsl:value-of select="substring(' ',string-length($javaTypeName)+1)"/>
|
|
2155
|
+
<xsl:text xml:space="preserve"> </xsl:text>
|
|
2156
|
+
<xsl:call-template name="javaTranslateProcName">
|
|
2157
|
+
<xsl:with-param name="attribName" select="@name"/>
|
|
2158
|
+
<xsl:with-param name="whichMode" select="get"/>
|
|
2159
|
+
</xsl:call-template>
|
|
2160
|
+
<xsl:text>()</xsl:text>
|
|
2161
|
+
<xsl:for-each select="getraises">
|
|
2162
|
+
<xsl:apply-templates select="."/>
|
|
2163
|
+
</xsl:for-each>
|
|
2164
|
+
<xsl:text>;</xsl:text>
|
|
2165
|
+
<xsl:if test="not(normalize-space(@readonly)='yes')">
|
|
2166
|
+
<xsl:value-of select="$IDLindent2"/><xsl:text>public void</xsl:text>
|
|
2167
|
+
<xsl:value-of select="substring(' ',string-length('void')+1)"/>
|
|
2168
|
+
<xsl:text xml:space="preserve"> </xsl:text>
|
|
2169
|
+
<xsl:call-template name="javaTranslateProcName">
|
|
2170
|
+
<xsl:with-param name="attribName" select="@name"/>
|
|
2171
|
+
<xsl:with-param name="whichMode">set</xsl:with-param>
|
|
2172
|
+
</xsl:call-template>
|
|
2173
|
+
<xsl:text>(</xsl:text>
|
|
2174
|
+
<xsl:value-of select="$javaTypeName"/>
|
|
2175
|
+
<xsl:text xml:space="preserve"> </xsl:text><xsl:value-of select="normalize-space(@name)"/>
|
|
2176
|
+
<xsl:text>)</xsl:text>
|
|
2177
|
+
<xsl:for-each select="setraises">
|
|
2178
|
+
<xsl:apply-templates select="." mode="javaInterfaces"/>
|
|
2179
|
+
</xsl:for-each>
|
|
2180
|
+
<xsl:text>;</xsl:text>
|
|
2181
|
+
</xsl:if>
|
|
2182
|
+
</xsl:template>
|
|
2183
|
+
|
|
2184
|
+
<xsl:template match="setraises|getraises|raises" mode="javaInterfaces">
|
|
2185
|
+
<xsl:if test="count(exception[string-length(normalize-space(@name))>0])">
|
|
2186
|
+
<xsl:value-of select="$javaRaisesIndent"/><xsl:text xml:space="preserve">throws </xsl:text>
|
|
2187
|
+
<xsl:for-each select="exception">
|
|
2188
|
+
<xsl:variable name="localExceptionName" select="normalize-space(@name)"/>
|
|
2189
|
+
<xsl:if test="string-length($localExceptionName)>0 and count(preceding-sibling::exception[normalize-space(@name)=$localExceptionName])=0">
|
|
2190
|
+
<xsl:if test="count(preceding-sibling::exception[not(normalize-space(@name)=$localExceptionName)])>0">
|
|
2191
|
+
<xsl:text>,</xsl:text>
|
|
2192
|
+
</xsl:if>
|
|
2193
|
+
<xsl:value-of select="$localExceptionName"/>
|
|
2194
|
+
</xsl:if>
|
|
2195
|
+
</xsl:for-each>
|
|
2196
|
+
</xsl:if>
|
|
2197
|
+
</xsl:template>
|
|
2198
|
+
|
|
2199
|
+
<xsl:template match="method" mode="javaInterfaces">
|
|
2200
|
+
<xsl:value-of select="$IDLindent2"/><xsl:text xml:space="preserve">public </xsl:text>
|
|
2201
|
+
<xsl:variable name="javaTypeName">
|
|
2202
|
+
<xsl:call-template name="javaTranslateTypeName">
|
|
2203
|
+
<xsl:with-param name="targetType" select="returns/@type"/>
|
|
2204
|
+
</xsl:call-template>
|
|
2205
|
+
</xsl:variable>
|
|
2206
|
+
<xsl:value-of select="$javaTypeName"/>
|
|
2207
|
+
<xsl:value-of select="substring(' ',string-length($javaTypeName)+1)"/>
|
|
2208
|
+
<xsl:text xml:space="preserve"> </xsl:text><xsl:value-of select="@name"/><xsl:text>(</xsl:text>
|
|
2209
|
+
<xsl:apply-templates select="parameters" mode="javaInterfaces"/>
|
|
2210
|
+
<xsl:text>)</xsl:text>
|
|
2211
|
+
<xsl:apply-templates select="raises" mode="javaInterfaces"/>
|
|
2212
|
+
<xsl:text>;</xsl:text>
|
|
2213
|
+
</xsl:template>
|
|
2214
|
+
|
|
2215
|
+
<xsl:template match="parameters" mode="javaInterfaces">
|
|
2216
|
+
<xsl:variable name="localParent"><xsl:value-of select="parent::method/@name"/></xsl:variable>
|
|
2217
|
+
<xsl:variable name="localParamIndent"><xsl:value-of select="$IDLindent2"/>
|
|
2218
|
+
<xsl:text xml:space="preserve"> </xsl:text>
|
|
2219
|
+
<xsl:value-of select="substring(' ',1,string-length($localParent) + string-length('public ( '))"/>
|
|
2220
|
+
</xsl:variable>
|
|
2221
|
+
<xsl:for-each select="param">
|
|
2222
|
+
<xsl:if test="count(preceding-sibling::param)>0">
|
|
2223
|
+
<xsl:text>,</xsl:text>
|
|
2224
|
+
<xsl:value-of select="$localParamIndent"/>
|
|
2225
|
+
</xsl:if>
|
|
2226
|
+
<xsl:call-template name="javaTranslateTypeName"/>
|
|
2227
|
+
<xsl:text xml:space="preserve"> </xsl:text>
|
|
2228
|
+
<xsl:value-of select="./@name"/>
|
|
2229
|
+
</xsl:for-each>
|
|
2230
|
+
</xsl:template>
|
|
2231
|
+
|
|
2232
|
+
<xsl:template match="text()" mode="javaInterfaces">
|
|
2233
|
+
</xsl:template>
|
|
2234
|
+
|
|
2235
|
+
<xsl:template match="*" mode="javaInterfaces">
|
|
2236
|
+
<!-- <xsl:apply-templates mode="javaInterfaces"/> -->
|
|
2237
|
+
</xsl:template>
|
|
2238
|
+
|
|
2239
|
+
|
|
2240
|
+
<!-- ECMAScript Binding -->
|
|
2241
|
+
|
|
2242
|
+
<xsl:template match="div1[@id='mathml-dom']" mode="ecmaInterfaces">
|
|
2243
|
+
<xsl:apply-templates mode="ecmaInterfaces" select=".//interface"/>
|
|
2244
|
+
</xsl:template>
|
|
2245
|
+
|
|
2246
|
+
|
|
2247
|
+
<xsl:template match="interface" mode="ecmaInterfaces">
|
|
2248
|
+
<xsl:if test="count(constant) > 0">
|
|
2249
|
+
<xsl:text xml:space="preserve">�subsection{Class </xsl:text>
|
|
2250
|
+
<xsl:value-of select="@name"/>
|
|
2251
|
+
<xsl:text>}
The �textbf{</xsl:text>
|
|
2252
|
+
<xsl:value-of select="@name"/>
|
|
2253
|
+
<xsl:text xml:space="preserve">} class has the following constants:

</xsl:text>
|
|
2254
|
+
<xsl:text>�begin{description}
</xsl:text>
|
|
2255
|
+
<xsl:apply-templates select="constant" mode="ecmaInterfaces"/>
|
|
2256
|
+
<xsl:text>
�end{description}
</xsl:text>
|
|
2257
|
+
</xsl:if>
|
|
2258
|
+
<xsl:text xml:space="preserve">�subsection{Object </xsl:text>
|
|
2259
|
+
<xsl:value-of select="@name"/>
|
|
2260
|
+
<xsl:text>}</xsl:text>
|
|
2261
|
+
<xsl:if test="string-length(normalize-space(@inherits))>0">
|
|
2262
|
+
<xsl:text>�textbf{</xsl:text>
|
|
2263
|
+
<xsl:value-of select="@name"/>
|
|
2264
|
+
<xsl:text xml:space="preserve">} has all the properties and methods of </xsl:text>
|
|
2265
|
+
<xsl:text>�textbf{</xsl:text>
|
|
2266
|
+
<xsl:value-of select="@inherits"/>
|
|
2267
|
+
<xsl:text xml:space="preserve">} as well as the properties and methods defined below.
</xsl:text>
|
|
2268
|
+
</xsl:if>
|
|
2269
|
+
<xsl:if test="count(attribute) > 0 or count(method) > 0">
|
|
2270
|
+
<!-- <xsl:text>�begin{itemize}
</xsl:text> -->
|
|
2271
|
+
<xsl:text>�begin{description}
</xsl:text>
|
|
2272
|
+
<xsl:if test="count(attribute) > 0">
|
|
2273
|
+
<xsl:text xml:space="preserve">�item The �textbf{</xsl:text>
|
|
2274
|
+
<xsl:value-of select="@name"/>
|
|
2275
|
+
<xsl:text xml:space="preserve">} object has the following properties:</xsl:text>
|
|
2276
|
+
<xsl:text>
�begin{description}
</xsl:text>
|
|
2277
|
+
<xsl:apply-templates select="attribute" mode="ecmaInterfaces"/>
|
|
2278
|
+
<xsl:text>�end{description}
</xsl:text>
|
|
2279
|
+
</xsl:if>
|
|
2280
|
+
<xsl:if test="count(method) > 0">
|
|
2281
|
+
<xsl:text xml:space="preserve">�item The �textbf{</xsl:text>
|
|
2282
|
+
<xsl:value-of select="@name"/>
|
|
2283
|
+
<xsl:text xml:space="preserve">} object has the following methods:</xsl:text>
|
|
2284
|
+
<xsl:text>
�begin{description}
</xsl:text>
|
|
2285
|
+
<xsl:apply-templates select="method" mode="ecmaInterfaces"/>
|
|
2286
|
+
<xsl:text>�end{description}
</xsl:text>
|
|
2287
|
+
</xsl:if>
|
|
2288
|
+
<!-- <xsl:text>�end{itemize}
</xsl:text> -->
|
|
2289
|
+
<xsl:text>�end{description}
</xsl:text>
|
|
2290
|
+
</xsl:if>
|
|
2291
|
+
</xsl:template>
|
|
2292
|
+
|
|
2293
|
+
<xsl:template match="constant" mode="ecmaInterfaces">
|
|
2294
|
+
<xsl:text>�item[�textbf{</xsl:text>
|
|
2295
|
+
<xsl:value-of select="parent::interface/@name"/>
|
|
2296
|
+
<xsl:text>.</xsl:text>
|
|
2297
|
+
<xsl:value-of select="@name"/>
|
|
2298
|
+
<xsl:text xml:space="preserve">}]This constant is of type �textbf{</xsl:text>
|
|
2299
|
+
<xsl:value-of select="@type"/>
|
|
2300
|
+
<xsl:text xml:space="preserve">} and its value is </xsl:text>
|
|
2301
|
+
<xsl:value-of select="@value"/>
|
|
2302
|
+
<xsl:text>.
</xsl:text>
|
|
2303
|
+
</xsl:template>
|
|
2304
|
+
|
|
2305
|
+
<xsl:template match="attribute" mode="ecmaInterfaces">
|
|
2306
|
+
<xsl:text>�item[�textbf{</xsl:text>
|
|
2307
|
+
<xsl:value-of select="@name"/>
|
|
2308
|
+
<xsl:text xml:space="preserve">}]This property is of type �textbf{</xsl:text>
|
|
2309
|
+
<xsl:value-of select="@type"/>
|
|
2310
|
+
<xsl:text>}.
</xsl:text>
|
|
2311
|
+
</xsl:template>
|
|
2312
|
+
|
|
2313
|
+
<xsl:template match="method" mode="ecmaInterfaces">
|
|
2314
|
+
<xsl:text>�item[�textbf{</xsl:text>
|
|
2315
|
+
<xsl:value-of select="@name"/><xsl:text>(</xsl:text>
|
|
2316
|
+
<xsl:for-each select="parameters/param">
|
|
2317
|
+
<xsl:if test="count(preceding-sibling::param) > 0">
|
|
2318
|
+
<xsl:text>,</xsl:text>
|
|
2319
|
+
</xsl:if>
|
|
2320
|
+
<xsl:value-of select="@name"/>
|
|
2321
|
+
</xsl:for-each>
|
|
2322
|
+
<xsl:text>)}]</xsl:text>
|
|
2323
|
+
<xsl:variable name="returnType" select="normalize-space(returns/@type)"/>
|
|
2324
|
+
<xsl:choose>
|
|
2325
|
+
<xsl:when test="string-length($returnType) = 0">
|
|
2326
|
+
<xsl:text xml:space="preserve">This method returns a �textbf{void}</xsl:text>
|
|
2327
|
+
</xsl:when>
|
|
2328
|
+
<xsl:when test="contains('aeiou',substring($returnType,1,1))">
|
|
2329
|
+
<xsl:text xml:space="preserve">This method returns an �textbf{</xsl:text>
|
|
2330
|
+
<xsl:value-of select="$returnType"/><xsl:text>}.</xsl:text>
|
|
2331
|
+
</xsl:when>
|
|
2332
|
+
<xsl:otherwise>
|
|
2333
|
+
<xsl:text xml:space="preserve">This method returns a �textbf{</xsl:text>
|
|
2334
|
+
<xsl:value-of select="$returnType"/><xsl:text>}.</xsl:text>
|
|
2335
|
+
</xsl:otherwise>
|
|
2336
|
+
</xsl:choose>
|
|
2337
|
+
<xsl:apply-templates select="parameters" mode="ecmaInterfaces"/>
|
|
2338
|
+
<xsl:text>
</xsl:text>
|
|
2339
|
+
</xsl:template>
|
|
2340
|
+
|
|
2341
|
+
<xsl:template match="parameters" mode="ecmaInterfaces">
|
|
2342
|
+
<xsl:for-each select="param">
|
|
2343
|
+
<xsl:text xml:space="preserve"> The �textbf{</xsl:text>
|
|
2344
|
+
<xsl:value-of select="./@name"/>
|
|
2345
|
+
<xsl:text xml:space="preserve">} parameter is of type �textbf{</xsl:text>
|
|
2346
|
+
<xsl:value-of select="./@type"/><xsl:text>}.</xsl:text>
|
|
2347
|
+
</xsl:for-each>
|
|
2348
|
+
</xsl:template>
|
|
2349
|
+
|
|
2350
|
+
<xsl:template match="raises|setraises|getraises" mode="ecmaInterfaces">
|
|
2351
|
+
</xsl:template>
|
|
2352
|
+
|
|
2353
|
+
<xsl:template match="text()" mode="ecmaInterfaces">
|
|
2354
|
+
</xsl:template>
|
|
2355
|
+
|
|
2356
|
+
<xsl:template match="*" mode="ecmaInterfaces">
|
|
2357
|
+
<xsl:apply-templates mode="ecmaInterfaces"/>
|
|
2358
|
+
</xsl:template>
|
|
2359
|
+
|
|
2360
|
+
|
|
2361
|
+
<!-- Generating DOM Inheritance Chart -->
|
|
2362
|
+
<xsl:template match="interface" mode="showInheritance">
|
|
2363
|
+
<xsl:variable name="thisName" select="normalize-space(@name)"/>
|
|
2364
|
+
<xsl:variable name="theReference">
|
|
2365
|
+
<xsl:choose>
|
|
2366
|
+
<xsl:when test="starts-with($thisName,'MathML')">
|
|
2367
|
+
|
|
2368
|
+
<xsl:text>�hyperref[</xsl:text
|
|
2369
|
+
>dom_<xsl:value-of select="substring-after($thisName, 'MathML')"/>
|
|
2370
|
+
<xsl:text>]{</xsl:text>
|
|
2371
|
+
<xsl:value-of select="$thisName"/>
|
|
2372
|
+
<xsl:text>}</xsl:text>
|
|
2373
|
+
</xsl:when>
|
|
2374
|
+
<xsl:otherwise>
|
|
2375
|
+
<xsl:value-of select="$thisName"/>
|
|
2376
|
+
</xsl:otherwise>
|
|
2377
|
+
</xsl:choose>
|
|
2378
|
+
</xsl:variable>
|
|
2379
|
+
<xsl:choose>
|
|
2380
|
+
<xsl:when test="count(ancestor::div1//interface[normalize-space(@inherits)=$thisName]) > 0">
|
|
2381
|
+
<xsl:text>�item </xsl:text>
|
|
2382
|
+
<xsl:copy-of select="$theReference"/>
|
|
2383
|
+
<xsl:text>
�begin{itemize}
</xsl:text>
|
|
2384
|
+
<xsl:apply-templates select="ancestor::div1//interface[normalize-space(@inherits)=$thisName]" mode="showInheritance"/>
|
|
2385
|
+
<xsl:text>
�end{itemize}
</xsl:text>
|
|
2386
|
+
</xsl:when>
|
|
2387
|
+
<xsl:otherwise>
|
|
2388
|
+
<xsl:text>�item </xsl:text>
|
|
2389
|
+
<xsl:copy-of select="$theReference"/>
|
|
2390
|
+
<xsl:text>
</xsl:text>
|
|
2391
|
+
</xsl:otherwise>
|
|
2392
|
+
</xsl:choose>
|
|
2393
|
+
</xsl:template>
|
|
2394
|
+
|
|
2395
|
+
<xsl:template match="*" mode="showInheritance">
|
|
2396
|
+
</xsl:template>
|
|
2397
|
+
|
|
2398
|
+
<xsl:template match="text()" mode="showInheritance">
|
|
2399
|
+
</xsl:template>
|
|
2400
|
+
|
|
2401
|
+
|
|
2402
|
+
|
|
2403
|
+
|
|
2404
|
+
|
|
2405
|
+
|
|
2406
|
+
|
|
2407
|
+
<xsl:template match="prod">
|
|
2408
|
+
<xsl:apply-templates
|
|
2409
|
+
select="lhs |
|
|
2410
|
+
rhs[preceding-sibling::*[1][name()!='lhs']] |
|
|
2411
|
+
com[preceding-sibling::*[1][name()!='rhs']] |
|
|
2412
|
+
constraint[preceding-sibling::*[1][name()!='rhs']] |
|
|
2413
|
+
vc[preceding-sibling::*[1][name()!='rhs']] |
|
|
2414
|
+
wfc[preceding-sibling::*[1][name()!='rhs']]"/>
|
|
2415
|
+
</xsl:template>
|
|
2416
|
+
|
|
2417
|
+
<xsl:template match="prodgroup/prod">
|
|
2418
|
+
<xsl:apply-templates
|
|
2419
|
+
select="lhs |
|
|
2420
|
+
rhs[preceding-sibling::*[1][name()!='lhs']] |
|
|
2421
|
+
com[preceding-sibling::*[1][name()!='rhs']] |
|
|
2422
|
+
constraint[preceding-sibling::*[1][name()!='rhs']] |
|
|
2423
|
+
vc[preceding-sibling::*[1][name()!='rhs']] |
|
|
2424
|
+
wfc[preceding-sibling::*[1][name()!='rhs']]"/>
|
|
2425
|
+
</xsl:template>
|
|
2426
|
+
|
|
2427
|
+
<!-- prodgroup: group of formal productions -->
|
|
2428
|
+
<!-- create one <tbody> for each group -->
|
|
2429
|
+
|
|
2430
|
+
<xsl:template match="prodgroup">
|
|
2431
|
+
<xsl:apply-templates/>
|
|
2432
|
+
</xsl:template>
|
|
2433
|
+
|
|
2434
|
+
|
|
2435
|
+
|
|
2436
|
+
<!-- lhs: left-hand side of formal productions -->
|
|
2437
|
+
<!-- make a table row with the lhs and the corresponding other
|
|
2438
|
+
pieces in this crazy mixed-up content model -->
|
|
2439
|
+
<xsl:template match="lhs">
|
|
2440
|
+
<xsl:text>{}�refstepcounter{prod}[�theprod]�label{</xsl:text>
|
|
2441
|
+
<xsl:value-of select="parent::prod/@id"/>
|
|
2442
|
+
<xsl:text>}</xsl:text>
|
|
2443
|
+
<xsl:text>   </xsl:text>
|
|
2444
|
+
<xsl:text>�tablecell </xsl:text>
|
|
2445
|
+
<code><xsl:apply-templates/></code>
|
|
2446
|
+
<xsl:text>�tablecell </xsl:text>
|
|
2447
|
+
<xsl:text>   ::=   </xsl:text>
|
|
2448
|
+
<xsl:text>�tablecell </xsl:text>
|
|
2449
|
+
<xsl:apply-templates
|
|
2450
|
+
select="following-sibling::*[1][name()='rhs']"/>
|
|
2451
|
+
</xsl:template>
|
|
2452
|
+
|
|
2453
|
+
<xsl:template match="rhs">
|
|
2454
|
+
<xsl:choose>
|
|
2455
|
+
<xsl:when test="preceding-sibling::*[1][name()='lhs']">
|
|
2456
|
+
<!-- td -->
|
|
2457
|
+
<code><xsl:apply-templates/></code>
|
|
2458
|
+
<xsl:text>�tablecell </xsl:text>
|
|
2459
|
+
<xsl:apply-templates
|
|
2460
|
+
select="following-sibling::*[1][name()='com' or
|
|
2461
|
+
name()='constraint' or
|
|
2462
|
+
name()='vc' or
|
|
2463
|
+
name()='wfc']"/>
|
|
2464
|
+
</xsl:when>
|
|
2465
|
+
<xsl:otherwise>
|
|
2466
|
+
<xsl:text>�tablecell�tablecell�tablecell </xsl:text>
|
|
2467
|
+
<code><xsl:apply-templates/></code>
|
|
2468
|
+
<xsl:text>�tablecell </xsl:text>
|
|
2469
|
+
<xsl:apply-templates
|
|
2470
|
+
select="following-sibling::*[1][name()='com' or
|
|
2471
|
+
name()='constraint' or
|
|
2472
|
+
name()='vc' or
|
|
2473
|
+
name()='wfc']"/>
|
|
2474
|
+
</xsl:otherwise>
|
|
2475
|
+
</xsl:choose>
|
|
2476
|
+
�tabularnewline
|
|
2477
|
+
</xsl:template>
|
|
2478
|
+
|
|
2479
|
+
|
|
2480
|
+
<xsl:template match="com">
|
|
2481
|
+
<xsl:choose>
|
|
2482
|
+
<xsl:when test="preceding-sibling::*[1][name()='rhs']">
|
|
2483
|
+
�textit{/*
|
|
2484
|
+
<xsl:apply-templates/>
|
|
2485
|
+
<xsl:text> */}</xsl:text>
|
|
2486
|
+
</xsl:when>
|
|
2487
|
+
<xsl:otherwise>
|
|
2488
|
+
<xsl:text>�tablecell�tablecell�tablecell </xsl:text>
|
|
2489
|
+
<xsl:text>�small�textit{/* </xsl:text>
|
|
2490
|
+
<xsl:apply-templates/>
|
|
2491
|
+
<xsl:text> */}</xsl:text>
|
|
2492
|
+
</xsl:otherwise>
|
|
2493
|
+
</xsl:choose>
|
|
2494
|
+
</xsl:template>
|
|
2495
|
+
|
|
2496
|
+
|
|
2497
|
+
<xsl:template match="scrap">
|
|
2498
|
+
<xsl:apply-templates select="head"/>
|
|
2499
|
+
�par�noindent�begin{tabularx}{�linewidth}{@{}l@{}l@{}l>{�raggedright}Xllll@{}}
|
|
2500
|
+
<xsl:apply-templates select="bnf | prod | prodgroup"/>
|
|
2501
|
+
�end{tabularx}�par�filbreak�par
|
|
2502
|
+
</xsl:template>
|
|
2503
|
+
|
|
2504
|
+
<xsl:template match="scrap/head" priority="10">
|
|
2505
|
+
<xsl:text> �paragraph{</xsl:text>
|
|
2506
|
+
<xsl:apply-templates/>
|
|
2507
|
+
<xsl:text>} </xsl:text>
|
|
2508
|
+
</xsl:template>
|
|
2509
|
+
|
|
2510
|
+
</xsl:stylesheet>
|