[
Lists Home |
Date Index |
Thread Index
]
>
> You could stick it into the XSL stylesheet itself (using XInclude
> perhaps an entity). Then you can cache the Templates object.
That might work with some processors. With Saxon, it won't. Saxon never
pre-evaluates the document() function at compile time. There could be a
run-time URIResolver that redirects the URI (even "") to somewhere else.
Also, I think the originator wanted to transform the same source document
using different stylesheets.
Michael Kay
http://www.saxonica.com/
> Then when
> you transform, you could access the included XML with something like:
>
> Source XML:
> <whatever/>
>
> XSL:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:my="my" version="1.0">
>
> <my:something boo="foo"/>
>
> <xsl:template match="/">
> <boo>
> <xsl:value-of
> select="document('')/xsl:stylesheet/my:something/@boo"/>
> </boo>
> </xsl:template>
>
> </xsl:stylesheet>
>
> best,
> -Rob
>
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://www.oasis-open.org/mlmanage/index.php>
>
>
|