You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by David Portabella Clotet <da...@portabella.name> on 2005/10/13 15:11:33 UTC

xalan, fn:distinct-values

Hello,

I have a problem with xalan using a XPath function inside a XSL file.

I've downloaded the last version of xalan, 2.7.0:
http://xml.apache.org/xalan-j/
http://mirror.switch.ch/mirror/apache/dist/xml/xalan-j/xalan-j_2_7_0-bin.zip

If I execute this command with a simple xsl file, it works:
java org.apache.xalan.xslt.Process -in example.xml -xsl example.xsl

But if I include the "distinct-values" XPath function in the
example.xsl, it does not work.

>Erreur XSLT (javax.xml.transform.TransformerException):
java.lang.NoSuchMethodException: For extension function, could not
find method org.apache.xpath.objects.XNodeSet.distinctValues([ExpressionContext,]
).

I have carefully looked at the classpath.
The only files in the classpath are the 4 jars included in the
xalan-j_2_7_0-bin.zip distribution:
serializer.jar, xalan.jar, xercesImpl.jar, xml-apis.jar

and I can see that in the class
org.apache.xpath.objects.XNodeSet.distinctValues of xalan.jar there is
not defined the function "distinctValues".

Then I looked at the documentation of XPath, and I've found that
"distinct-values" is defined in XPath (at least XPath 2)
http://www.w3.org/TR/xquery-operators/

-------------------
So I have some questions:

Is "distinct-values" only defined in XPath2, not in XPath1?
Xalan does not support XPath2 at the moment?

Where is the knowledge to transform the XSL/XPath function
"distinct-values" to the method
org.apache.xpath.objects.XNodeSet.distinctValues?
(it must be somewhere in the standard java library, java.xml.transform)
so, java just defines the interface and then there are somple
implementations, such as Xalan and Saxon?

What are the different xml/xsl/xpath java packages?
I've heard of Saxon, which implements XPath2.
are there others? how do they compare to each other?
what are the features that I should look when deciding which
xml/xsl/xpath package to choose?

Is it forseen that Xalan implements XPath2 soon?

Best regards,
DAvid

xalan, fn:distinct-values

Posted by David Portabella Clotet <da...@gmail.com>.
Hello,

I have a problem with xalan using a XPath function inside a XSL file.

I've downloaded the last version of xalan, 2.7.0:
http://xml.apache.org/xalan-j/
http://mirror.switch.ch/mirror/apache/dist/xml/xalan-j/xalan-j_2_7_0-bin.zip

If I execute this command with a simple xsl file, it works:
java org.apache.xalan.xslt.Process -in example.xml -xsl example.xsl

But if I include the "distinct-values" XPath function in the
example.xsl, it does not work.

>Erreur XSLT (javax.xml.transform.TransformerException):
java.lang.NoSuchMethodException: For extension function, could not
find method org.apache.xpath.objects.XNodeSet.distinctValues([ExpressionContext,]
).

I have carefully looked at the classpath.
The only files in the classpath are the 4 jars included in the
xalan-j_2_7_0-bin.zip distribution:
serializer.jar, xalan.jar, xercesImpl.jar, xml-apis.jar

and I can see that in the class
org.apache.xpath.objects.XNodeSet.distinctValues of xalan.jar there is
not defined the function "distinctValues".

Then I looked at the documentation of XPath, and I've found that
"distinct-values" is defined in XPath (at least XPath 2)
http://www.w3.org/TR/xquery-operators/

-------------------
So I have some questions:

Is "distinct-values" only defined in XPath2, not in XPath1?
Xalan does not support XPath2 at the moment?

Where is the knowledge to transform the XSL/XPath function
"distinct-values" to the method
org.apache.xpath.objects.XNodeSet.distinctValues?
(it must be somewhere in the standard java library, java.xml.transform)
so, java just defines the interface and then there are somple
implementations, such as Xalan and Saxon?

What are the different xml/xsl/xpath java packages?
I've heard of Saxon, which implements XPath2.
are there others? how do they compare to each other?
what are the features that I should look when deciding which
xml/xsl/xpath package to choose?

Is it forseen that Xalan implements XPath2 soon?

Best regards,
DAvid