Dumb XSL question
Sep. 21st, 2004 12:35 pmFor some reason XSL just won't stick in my brain, so I have to ask my friends list.
If I have a document which contains AAA nodes and I want to transform them to BBB nodes I can do something like:
But suppose I want to replace every AAA immediately followed by a CCC (throwing the CCC away)? Something like
is my guess, but then I'm told "Only child:: and attribute:: axes are allowed in match patterns!"
Anyone got any clues? I'm trying to pretend this isn't just directed at
lozette...
If I have a document which contains AAA nodes and I want to transform them to BBB nodes I can do something like:
<xsl:template match="AAA"> <BBB><xsl:apply-templates/></BBB> </xsl:template>
But suppose I want to replace every AAA immediately followed by a CCC (throwing the CCC away)? Something like
<xsl:template match="AAA/following-sibling::CCC[1]"> <BBB><xsl:apply-templates/></BBB> </xsl:template>
is my guess, but then I'm told "Only child:: and attribute:: axes are allowed in match patterns!"
Anyone got any clues? I'm trying to pretend this isn't just directed at