4 This file is currently duplicated to each directory containing reference data
5 XML files. This is to make it compatible with more browsers.
6 To keep these files in sync, please only modify the version in
8 and use the copy_xsl.sh script to copy it to relevant locations.
10 <xsl:stylesheet version=
"1.0"
11 xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform">
13 <xsl:template match=
"/">
15 <xsl:apply-templates/>
19 <xsl:template match=
"/ReferenceData">
20 <h1>Test Reference Data
</h1>
21 <xsl:apply-templates/>
24 <xsl:template match=
"Vector">
25 (
<xsl:value-of select=
"*[@Name='X']"/>;
26 <xsl:value-of select=
"*[@Name='Y']"/>;
27 <xsl:value-of select=
"*[@Name='Z']"/>)
30 <xsl:template name=
"SequenceAsHorizontalTable">
31 <xsl:param name=
"root" select=
"."/>
33 <tr><th>Count
</th><th>Items
</th></tr>
35 <td><xsl:value-of select=
"$root/Int[@Name='Length']"/></td>
37 <xsl:call-template name=
"SequenceAsCSV">
38 <xsl:with-param name=
"root" select=
"$root"/>
45 <xsl:template name=
"SequenceAsCSV">
46 <xsl:param name=
"root" select=
"."/>
47 <xsl:for-each select=
"$root/*">
48 <xsl:if test=
"not(.[@Name])">
49 <xsl:apply-templates select=
"."/>
50 <xsl:if test=
"position() < last()">,
</xsl:if>
55 <xsl:template name=
"Bool">
56 <xsl:value-of select=
"."/>
59 <xsl:template name=
"String">
60 <xsl:value-of select=
"."/>
63 <xsl:template name=
"Int">
64 <xsl:value-of select=
"."/>
67 <xsl:template name=
"Real">
68 <xsl:value-of select=
"."/>
71 <xsl:template match=
"OutputFiles">
74 <xsl:apply-templates />
78 <xsl:template match=
"OutputFiles/File">
80 <h3><xsl:value-of select=
"@Name"/></h3>
81 <xsl:apply-templates />
85 <xsl:template match=
"OutputFiles/File/String[@Name='Contents']">
87 <xsl:value-of select=
"substring(.,2)"/>
91 <xsl:template match=
"OutputFiles/File/XvgLegend/String[@Name='XvgLegend']">
93 <xsl:value-of select=
"substring(.,2)"/>
97 <xsl:template match=
"OutputFiles/File/XvgData">
101 <xsl:apply-templates />
104 <xsl:otherwise>Data omitted
</xsl:otherwise>
108 <xsl:template match=
"OutputFiles/File/XvgData/Sequence">
110 <xsl:apply-templates select=
"Real"/>
114 <xsl:template match=
"OutputFiles/File/XvgData/Sequence/Real">
115 <td><xsl:value-of select=
"."/></td>
118 <xsl:template match=
"InteractiveSession">
120 <xsl:for-each select=
"*">
122 <xsl:when test=
"starts-with(@Name, 'Output')">
123 <xsl:value-of select=
"substring(.,2)"/>
125 <xsl:when test=
"string-length(.)=1">
126 <xsl:text>►</xsl:text>
127 <xsl:text>¶</xsl:text>
129 <xsl:when test=
"contains(substring(.,2), ' ')">
130 <xsl:text>►</xsl:text>
131 <xsl:value-of select=
"translate(substring(.,2), ' ', '⏎')"/>
132 <xsl:text> </xsl:text>
135 <xsl:text>►</xsl:text>
136 <xsl:value-of select=
"substring(.,2)"/>
137 <xsl:text>¶</xsl:text>
141 <xsl:text>[EOF]
</xsl:text>