xsl-list
[Top] [All Lists]

Re: [xsl] question regarding setting anyURI from java

2011-07-06 10:55:08
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

--~------------------------------------------------------------------
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>
--~--