Hello,
i'm a little bit stuck with xslt and xquery.
Here is my problem, starting with showing the problem:
My xml looks like this
My problem actually is to resolve the copies within the xml.
As you see there is a style named "_Ausgabe" and there is a copy tag with referers to this. Now i need to copy the whole "_Ausgabe" style to the copy tag position.
Here is the xsl code
But as you might know, it doens't work!
How can i address a node by an attribute which value is determined by an attribute of the currently processed node? (Addressing style node by attribute "name" with the value of the current copy node attribute "ref")
Sorry for this crappy explanation.
Hope someone might help me
i'm a little bit stuck with xslt and xquery.
Here is my problem, starting with showing the problem:
My xml looks like this
Code:
<styles>
<style name="_Ausgabe" src="css/_Ausgabe.css">
<!-- Darüber steht fest als Text: "Patientenkennung" -->
<juxtaposed>
<slotDescriptor name="digit0" type="text" class="Text Digit"/>
<slotDescriptor name="digit1" type="text" class="Text Digit"/>
<slotDescriptor name="digit2" type="text" class="Text Digit"/>
<slotDescriptor name="digit3" type="text" class="Text Digit"/>
</juxtaposed>
</style>
<style name="Administration" src="css/Administration.css">
<juxtaposed>
<stacked>
<copy ref="_Ausgabe"/>
<copy ref="_3erWahl"/>
</stacked>
</juxtaposed>
</style>
</styles>
As you see there is a style named "_Ausgabe" and there is a copy tag with referers to this. Now i need to copy the whole "_Ausgabe" style to the copy tag position.
Here is the xsl code
Code:
<xsl:template match="copy">
<xsl:copy-of select="/child::styles/child::style[attribute::name=self[attribute::ref]]" />
</xsl:template>
How can i address a node by an attribute which value is determined by an attribute of the currently processed node? (Addressing style node by attribute "name" with the value of the current copy node attribute "ref")
Sorry for this crappy explanation.
Hope someone might help me