xml2vot.xsl
1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"/>
<xsl:template match="/timetable">
<VOTABLE version='1.1'>
<DESCRIPTION>
Name: <xsl:value-of select="name"/>;
Description: <xsl:value-of select="description"/>;
Historic: <xsl:value-of select="history"/>;
Creation Date : <xsl:value-of select="created"/>;
</DESCRIPTION>
<RESOURCE>
<DESCRIPTION>
AMDA @ CDPP
</DESCRIPTION>
<TABLE>
<FIELD datatype='char' name='Start Time' ID='TimeIntervalStart' ucd='time.start'>
<DESCRIPTION>time tag for beginning of interval</DESCRIPTION>
</FIELD>
<FIELD datatype='char' name='Stop Time' ID='TimeIntervalStop' ucd='time.stop'>
<DESCRIPTION>time tag for end of interval</DESCRIPTION>
</FIELD>
<DATA>
<TABLEDATA>
<xsl:for-each select="intervals">
<TR>
<TD><xsl:value-of select="start"/></TD>
<TD><xsl:value-of select="stop"/></TD>
</TR>
</xsl:for-each>
</TABLEDATA>
</DATA>
</TABLE>
</RESOURCE>
</VOTABLE>
</xsl:template>
</xsl:stylesheet>