Subject: Re: [xsl] how to test previous node name From: xslt.new <xslt.new@xxxxxxxxx> Date: Sun, 11 Feb 2007 20:00:57 -0600 |
Thank you for your response. I did try this inside template <item> but it fails to get me the right result.
<xsl:template match="item"> <xsl:if test="preceding::*[1][self::test1]">
<xsl:text>Found test1</xsl:text> </xsl:if>
On 2/11/07, xslt. new <xslt.new@xxxxxxxxx> wrote: > Hi all: > > I have an XML input: > > <test1> > <item></item> > <text></text> > <item></item> > </test1> > > How do I check if the previous node name for <item> is test1 or text?
select="preceding::*[1][self::item1 or self::text]"
cheers andrew
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] how to test previous node, Abel Braaksma | Thread | Re: [xsl] how to test previous node, Kamal Bhatt |
Re: [xsl] XSLFO - fo:basic-link, Chris_Graham | Date | Re: [xsl] how to test previous node, Kamal Bhatt |
Month |