xml2vot.xsl 1.11 KB
<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>
        Time Table generated by AMDA @ CDPP;
        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>