A
adurth
Hi!
I am working on a xml->xml transformation. The source-file contains
the following entities:
<ef:Test>
....
....
<ef:ID>1234</ef:ID>
</ef:Test>
<ef:errorReference>
....
....
<ef:reference_test>1234</ef:referemce_test>
</ef:errorReference>
<ef:errorReference>
....
....
<ef:reference_test>2345</ef:reference_test>
</ef:errorReference>
My transformation is supposed to filter for every single test those
corresponding errorReferences, that have a <ef:reference_test>-value
matching the <ef:ID>-value of the current test.
So I´ve been trying...
<xsl:template match="/">
....
....
<xsl:apply-templates select="ef:Test"/>
</xsl:template match>
<xsl:template match="ef:Test">
<xsl:variable name="testID" select="ef:ID"/>
<!--xsl:copy-of select="..//ef:Fehlerzuordnung[Referenz_Test =
ef:ID]"/-->
<xsl:copy-of select="..//ef:Fehlerzuordnung[Referenz_Test =
$testID]"/>
</xsl:template>
Both alternatives WON´T work. Neither the one commented out, nor the
one currently in place. I suppose the path or the variable is no
longer valid in that call, respectively.
So far I haven´t come up with a solution, can somebody help me?
Thank you,
Andreas
I am working on a xml->xml transformation. The source-file contains
the following entities:
<ef:Test>
....
....
<ef:ID>1234</ef:ID>
</ef:Test>
<ef:errorReference>
....
....
<ef:reference_test>1234</ef:referemce_test>
</ef:errorReference>
<ef:errorReference>
....
....
<ef:reference_test>2345</ef:reference_test>
</ef:errorReference>
My transformation is supposed to filter for every single test those
corresponding errorReferences, that have a <ef:reference_test>-value
matching the <ef:ID>-value of the current test.
So I´ve been trying...
<xsl:template match="/">
....
....
<xsl:apply-templates select="ef:Test"/>
</xsl:template match>
<xsl:template match="ef:Test">
<xsl:variable name="testID" select="ef:ID"/>
<!--xsl:copy-of select="..//ef:Fehlerzuordnung[Referenz_Test =
ef:ID]"/-->
<xsl:copy-of select="..//ef:Fehlerzuordnung[Referenz_Test =
$testID]"/>
</xsl:template>
Both alternatives WON´T work. Neither the one commented out, nor the
one currently in place. I suppose the path or the variable is no
longer valid in that call, respectively.
So far I haven´t come up with a solution, can somebody help me?
Thank you,
Andreas