Subject: Re: [xsl] PARAMS and VARIABLES in XSL From: Abel Braaksma <abel.online@xxxxxxxxx> Date: Tue, 30 Jan 2007 21:04:21 +0100 |
I need help with the following problem.
This is the XML is wish to transform:
I have tried all sorts of solutions using axes,
preceding-sibling, but these did not work, since the
<word> and <sound> are not true siblings to the
processor, even though they are on the same level of
the hierarchy.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:template match="//clause/*">
<xsl:param name="soundtime" />
<xsl:if test="local-name() = 'sound'">
<xsl:param name="soundtime" select="@time" />
</xsl:if>
<xsl:if test="local-name() = 'word'">
<word sound = "{$soundtime}" >
<xsl:template match="somenode"> ... DO something IF this node is encountered in the source
Cheers, -- Abel
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] PARAMS and VARIABLES in X, mark bordelon | Thread | Re: [xsl] PARAMS and VARIABLES in X, mark bordelon |
RE: [xsl] PARAMS and VARIABLES in X, Michael Kay | Date | Re: [xsl] PARAMS and VARIABLES in X, David Carlisle |
Month |