|
Subject: [xsl] Copying and updating selectively From: "John Reid" <John.Reid@xxxxxxxxxxxxxxx> Date: Sat, 26 Jul 2003 17:35:09 +1000 |
g'day,
i got so far with this and then came up empty. I want to update/copy a
xml file updating any yes node to null (i guess deleting the text node
is the better way to put it). So that i start with ONE and end with TWO
on the condition that the @ID date is within the two date parameters.
The code at the bottom is my starting attempt. The two date parameters
are $varFrom=20030806 and $varTo=20030814
any thoughts
salud John Reid
ONE
<player>
<dates>
<yes ID="20030722" WE="Tu"></yes>
<yes ID="20030729" WE="Tu"></yes>
<yes ID="20030805" WE="Tu"></yes>
<yes ID="20030809" WE="Sa">D</yes>
<yes ID="20030810" WE="Su">D</yes>
<yes ID="20030812" WE="Tu">D</yes>
<yes ID="20030819" WE="Tu"></yes>
<yes ID="20030826" WE="Tu"></yes>
</dates>
</player>
TWO
<player>
<dates>
<yes ID="20030722" WE="Tu"></yes>
<yes ID="20030729" WE="Tu"></yes>
<yes ID="20030805" WE="Tu"></yes>
<yes ID="20030809" WE="Sa"></yes>
<yes ID="20030810" WE="Su"></yes>
<yes ID="20030812" WE="Tu"></yes>
<yes ID="20030819" WE="Tu"></yes>
<yes ID="20030826" WE="Tu"></yes>
</dates>
</player>
<xsl:template match="player/dates/yes">
<xsl:copy>
<xsl:apply-templates select=".[@ID < $varFrom]"/>
<xsl:apply-templates select=".[@ID > $varTo]"/>
?????
</xsl:copy>
</xsl:template>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Adding another layer of g, Jeni Tennison | Thread | RE: [xsl] Copying and updating sele, John Reid |
| [xsl] Adding another layer of globa, Charles Muller | Date | RE: [xsl] Copying and updating sele, John Reid |
| Month |