[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] question regarding setting anyURI from java


Subject: Re: [xsl] question regarding setting anyURI from java
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Wed, 06 Jul 2011 16:54:52 +0100

On 06/07/2011 16:34, Robby Pelssers wrote:
Hi Michael,

Although the snippet was showing a xquery, the very question itself was not so much xquery related. I would rather say it was related to Xpath functions.

I could have asked the same question in another format and the answer would have been the same:

<xsl:param name="uri" as="xs:anyURI"/>

<xsl:template match="/">
   <xsl:copy-of select="doc($uri)/Content"/>
</xsl:template>


Well, the answer wouldn't be the same. The mapping from Java classes to XPath types depends on the API you are using. From your exception it looked as if you were using the XQJ API, which defines one set of rules, and is specific to XQuery. Java-based XSLT processors define their own set of rules (and they are different for each processor.)

Michael Kay
Saxonica


Current Thread
Keywords