[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
RE: replacing values in file1 from file2
Subject: RE: replacing values in file1 from file2
From: "ronan martin" <ronanmartin124@xxxxxxxxxxx>
Date: Mon, 29 Mar 2004 10:38:36 +0200
|
Hi Jarno
It works perfectly (and it's so simple!). Thanks a lot.
Ronan
From: <Jarno.Elovirta@xxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: replacing values in file1 from file2
Date: Mon, 29 Mar 2004 11:19:36 +0300
Hi,
> <xsl:variable name="position"
> select="count(preceding-sibling::self)"/>
There is no element "self" in file1.
> <xsl:for-each select=".">
You're already processing the current node, thus this is not needed. Try
something like this
<xsl:template match="tuv[lang('da-dk')]/seg[not(ph)]/text()">
<xsl:variable name="position"
select="count(../../../preceding-sibling::tu[tuv[lang('da-dk')]/seg[not(ph)]])"/>
<xsl:text>"</xsl:text>
<xsl:value-of select="document('file2.xml',
/)/values/value[count(preceding-sibling::value) = $position]"/>
<xsl:text>"</xsl:text>
</xsl:template>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
Cheers,
Jarno - Suicide Commando: Deliver Us From Evil
_________________________________________________________________
Fe alle de nye og sjove ikoner med MSN Messenger http://messenger.msn.dk
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|