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
--
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 20 4230000
F +31 20 4223500