Correct nrdf for 1D/2D systems
[gromacs/AngularHB.git] / src / testutils / common-referencedata.xsl
blob1ae38d84525b8dfc62b0f5178ad9305cb3948268
1 <?xml version="1.0"?>
3 <!--
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
7 src/testutils/
8 and use the copy_xsl.sh script to copy it to relevant locations.
9 -->
10 <xsl:stylesheet version="1.0"
11 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
13 <xsl:template match="/">
14 <html><body>
15 <xsl:apply-templates/>
16 </body></html>
17 </xsl:template>
19 <xsl:template match="/ReferenceData">
20 <h1>Test Reference Data</h1>
21 <xsl:apply-templates/>
22 </xsl:template>
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']"/>)
28 </xsl:template>
30 <xsl:template name="SequenceAsHorizontalTable">
31 <xsl:param name="root" select="."/>
32 <table border="1">
33 <tr><th>Count</th><th>Items</th></tr>
34 <tr>
35 <td><xsl:value-of select="$root/Int[@Name='Length']"/></td>
36 <td>
37 <xsl:call-template name="SequenceAsCSV">
38 <xsl:with-param name="root" select="$root"/>
39 </xsl:call-template>
40 </td>
41 </tr>
42 </table>
43 </xsl:template>
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() &lt; last()">, </xsl:if>
51 </xsl:if>
52 </xsl:for-each>
53 </xsl:template>
55 <xsl:template name="Bool">
56 <xsl:value-of select="."/>
57 </xsl:template>
59 <xsl:template name="String">
60 <xsl:value-of select="."/>
61 </xsl:template>
63 <xsl:template name="Int">
64 <xsl:value-of select="."/>
65 </xsl:template>
67 <xsl:template name="Real">
68 <xsl:value-of select="."/>
69 </xsl:template>
71 </xsl:stylesheet>