neerajmurali Posted April 23, 2007 Share Posted April 23, 2007 For comparing the contents of two elements i am using the compare funtion.but its showing error like this 'compare' is not a valid XSLT or XPath function.i am using IE 6 browser. for eg i want to compare the following two elements and check wther its same .<artist>Empire Burlesque</artist> <author>Dolly Parton</author> Link to comment Share on other sites More sharing options...
boen_robot Posted April 24, 2007 Share Posted April 24, 2007 Well, a compare() functin simply doesn't exist, that's for sure.What do you mean by "the same"? Whether it's content is equivalent to another? Well, you can use XPath predicates for that, like so: artist[.=../author] That would compare whether the artist element is the same as the author below it. Link to comment Share on other sites More sharing options...
neerajmurali Posted April 24, 2007 Author Share Posted April 24, 2007 wther xalan xslt processor supports xpath2? Link to comment Share on other sites More sharing options...
boen_robot Posted April 24, 2007 Share Posted April 24, 2007 Whoa... but... oh... so there is a compare() function. Curious... anyhow.No, Xalan doesn't currently support XPath 2.0. Btw, I know from a trusty source (Michael Kay, editor of the XSLT 2.0 specification) that XPath 2.0 won't be available for XSLT 1.0 processors. So whenever you're wondering if a certain XSLT processor supports XPath 2.0, you should instead ask yourself if it's an XSLT 2.0 processor. The only 2 XSLT 2.0 processors currently are Saxon and AltovaXML2007. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now