[XSL-LIST Mailing List Archive Home]
Re: [xsl] Multiple search and replace
Subject: Re: [xsl] Multiple search and replace|
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Wed, 2 Apr 2008 15:59:07 +0530
On 4/2/08, Pankaj Chaturvedi <pankaj.chaturvedi@xxxxxxxxx> wrote:
> Thanks Abel. Seems that the simple answer is use version="2.0". But as you
> correctly correct I am running into the problem.
> I did tried to test by changing the "version' attribute value to 2.0 but I
> am encountering another error at one of my line, where I am using <xsl:if
> test="name(following-sibling::keyword)"> Error: XPATH 2.0 expression, Too
> many items.
> This was perfect in 1.0.
If you are using an XSLT 2.0 processor, then try to use 2.0 facilities
and not that of XSLT 1.0.
The construct, name(following-sibling::keyword) will not work in 2.0
(it's logically wrong even in XSLT 1.0, though it will work as only
1st element is considered) because you can get name of only 1 node and
not multiple nodes.
> I think I need to move to other Processor or may be any suggestions to use
> another XML editor?
Use Saxon 9.
> Secondly, I would not prefer to re-write/modify my style sheet again, and
> prefer to use processor with backward compatibility.
I think, then you throw away all the advantage offered by XSLT 2.0.
The wise thing will be, use as much XSLT 2.0 features as you can.