Select attribute
Hej, sidder og forsoeger at skrue et xsl dokument sammen, men uden held. Nogle der lige kan spotte fejlen?Jeg leder paa samme tid efter noget software, til udvikling af XSLT, nogle forslag? Helst nogle lidt billigere alternativer end xmlspy.
XSL:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://w3.org/1999/XSL/Transform">
<xsl:template match="/datacollections/datacollection[@key='PointInfo']">
<table>
<tr>
<td>PointCode:</td>
<td>PointDescription:</td>
</tr>
<xsl:for-each select="/datacollections/datacollection[@key='PointInfo']/data/row">
<tr>
<td><xsl:value-of select="@PointCode"/></td>
<td><xsl:value-of select="@PointDescription"/></td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
XML:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="MonthlyReportStylesheet.xsl"?>
<datacollections>
<datacollection key="PointInfo">
<fields>
<field name="PointCode"/>
<field name="PointDescription"/>
<field name="PointUnits"/>
</fields>
<data>
<row PointCode="J2K11T2" PointDescription="TEMP.USCITA TORRE PAFFR" PointUnits="%"/>
<row PointCode="J2K11T3" PointDescription="TEMP.USCasdITA TORRE PAFFR" PointUnits="C"/>
<row PointCode="J2K15T2" PointDescription="TEMP.USCITA TasdORRE PAFFR" PointUnits="mA"/>
<row PointCode="J2K11T5" PointDescription="TEMP.USCITasdaA TORRE PAFFR" PointUnits="mA"/>
<row PointCode="J2K11T9" PointDescription="TEMP.USCITA TORRE PAFFR" PointUnits="kW"/>
<row PointCode="J2K11T7" PointDescription="TEMP.USCITA TORREasdas PAFFR" PointUnits="kV"/>
</data>
</datacollection>
<datacollection key="PointData">
<fields>
<field name="PointValue"/>
<field name="Date"/>
</fields>
</datacollection>
</datacollections>