xsl-list
[Top] [All Lists]

Re: [xsl] Multiple search and replace

2008-04-02 03:29:28
On 4/2/08, Pankaj Chaturvedi <pankaj(_dot_)chaturvedi(_at_)idsil(_dot_)com> 
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.


-- 
Regards,
Mukul Gandhi

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--