S
ShakyMobo
I've got two xml files, nr.1 one which among other elements contains
elements with Xpath expressions for selecting elements from the the 2. file
xml#1 (Metadata for xml#2)
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<cml doc="hello.xml">
<info>
<creator>MR X</creator>
<date>240205</date>
<range>/text[position()=1]</range>
</info>
....
</cml>
xml#2
<article>
<text>
Hello there!
</text>
<text>Hey man</text>
</article>
What I want to do is to use the first <range> element to select the
textelement from xml nr 2.
test.xsl
<xsl:variable name="content" select="document('hello.xml')/article"/>
<xsl:template match="/">
<xsl:for-each select="/cml/info">
....
get first "range" element
get value from xml#2 according to the range element
....
I first tried with variables but soon realized that the values couldn't be
changed, and I don't think variables works too good with expressions?
Any suggestions on how to accomplish this task?
elements with Xpath expressions for selecting elements from the the 2. file
xml#1 (Metadata for xml#2)
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<cml doc="hello.xml">
<info>
<creator>MR X</creator>
<date>240205</date>
<range>/text[position()=1]</range>
</info>
....
</cml>
xml#2
<article>
<text>
Hello there!
</text>
<text>Hey man</text>
</article>
What I want to do is to use the first <range> element to select the
textelement from xml nr 2.
test.xsl
<xsl:variable name="content" select="document('hello.xml')/article"/>
<xsl:template match="/">
<xsl:for-each select="/cml/info">
....
get first "range" element
get value from xml#2 according to the range element
....
I first tried with variables but soon realized that the values couldn't be
changed, and I don't think variables works too good with expressions?
Any suggestions on how to accomplish this task?