G
Guest
Hi to all,
I have a xml file with labels and data.
Im trying to mix both files to generate someting like:
Label A : data of node a
Label B : data of node b
Label C : data of node c
My main problem its that the only thing that i know is that the number of
node labels is equal to the nodes of data.
<MYDataSet>
<Table1>
<A>Label A</A>
<B>Label B</B>
<C>Label C</C>
<D>Label D</D>
</Table1>
<Table3>
<A>Data of Node A</A>
<B>Data of node B</B>
<C>data of node c</C>
<D>data of node d</D>
</Table3>
</MYDataSet>
For other hand i have this xslt sheet:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xslutput method="html" />
<xsl:template match="/MYDataSet">
<table>
<tr>
<td>
<h2>Detalle de electricidad</h2>
</td>
</tr>
<xsl:apply-templates select="Table1"/>
</table>
</xsl:template>
<xsl:template match="Table1/*">
<tr>
<td><xsl:value-of select="."></xsl:value-of></td>
<td><xsl:value-of
select="../../Table3/ancestor::name/."></xsl:value-of></td>
</tr>
</xsl:template>
</xsl:stylesheet>
I have a xml file with labels and data.
Im trying to mix both files to generate someting like:
Label A : data of node a
Label B : data of node b
Label C : data of node c
My main problem its that the only thing that i know is that the number of
node labels is equal to the nodes of data.
<MYDataSet>
<Table1>
<A>Label A</A>
<B>Label B</B>
<C>Label C</C>
<D>Label D</D>
</Table1>
<Table3>
<A>Data of Node A</A>
<B>Data of node B</B>
<C>data of node c</C>
<D>data of node d</D>
</Table3>
</MYDataSet>
For other hand i have this xslt sheet:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xslutput method="html" />
<xsl:template match="/MYDataSet">
<table>
<tr>
<td>
<h2>Detalle de electricidad</h2>
</td>
</tr>
<xsl:apply-templates select="Table1"/>
</table>
</xsl:template>
<xsl:template match="Table1/*">
<tr>
<td><xsl:value-of select="."></xsl:value-of></td>
<td><xsl:value-of
select="../../Table3/ancestor::name/."></xsl:value-of></td>
</tr>
</xsl:template>
</xsl:stylesheet>