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 Matthijs Wensveen <m....@func.nl> on 2007/04/10 10:34:21 UTC
Re: base uri of a node passed in as a param
Matthijs Wensveen wrote:
> Hello,
> I was doing some experimenting with what kind of objects you can pass
> in as a parameter. Turns out you can pass entire org.w3c.dom.Node and
> Documents into Xalan, which I was very happy with.
> However, I can't seem to find a way to set a base uri of a passed in
> Document. I've tried to set the document URI with
> document.setDocumentURI(), but that doesn't seem to work. When you use
> a Node or Document as a DOMSource for a transformation, then you can
> set the systemId.
>
> Example:
> <xsl:stylesheet>
> <xsl:param name="node"/>
>
> <xsl:template match="/">
> <xsl:value-of select="document( $node/file/href, $node )"/>
> </xsl:template>
>
> </xsl:stylesheet>
>
> Unfortunately URIResolver doesn't give you the base node but a base
> string in resolve(href, base), because then I could ask the node for
> it itself, or keep track some other way.
>
> Any ideas? Or am I already too far messing with undocumented features.
>
> BTW. I do understand result-tree fragments and such, so no lectures
> about that please :) Except when you feel the need to do so anyway :D
>
Bump.
Still struggling with this. If I fix this in the source code, would
that be an interesting patch? If not, I won't spend time on this
anymore, but if it is, I'll try to implement this 'feature' and supply a
patch.
Regards,
Matthijs