This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Loading an external file of index
> > Ah - I forgot to write... Of course there is no need in any PI's - just
> >
> > <xsl:variable name="loaded-doc" select="document( 'some-uri-here')"/>
> >
> > And then re-use $loaded-doc when you need it.
>
> This is not possible in XSLT because $loaded-doc is not a document
> fragment, but only a node set. So I can't, for example, write
$loaded-doc is not 'only' node set it is THE node set.
You can get document fragment ( I think you mean
result tree fragment ) out of node set, but you can not
get node set out of rtf ( .... well, you can ..... with
xt:node-set or some other non-stadard thing ).
In the world of XSLT - when you have node set ( and only
then ) - you can do *everything* you want. When you have resul
tree fragment - you are limited in the things you can do
( until you got the node-set out of rtf ;-)
> <xsl:value-of select="$loaded-doc/*[1]"/>
What do you need in particular ?
<xsl:value-of select="$loaded-doc/node()/*[1]"/>
?
I don't udnestand how can node set be not enough.
> For this reason I suggested the PI.
The only reason for PI could be "cache this URI for all the
stylesheets which will run on this client". ( Or "not cache
this URI..." ). Whatever.
Nobody will change anything in XSLT paper and I'm sure
that MS will implement their own scheme for caching
( like they currently do with XML files, looking inside the
content, ignoring mime-types e t.c. ) And because there
is only one browser with some XSLT support ( not to say
that there is just one browser ) - this 'conformant XSLT
caching' issue looks very hypotetical to me.
If some 100% conformat XSLT engine will try to do that
useless caching, I'l hack it around providing fake URI,
like I'm doing it now with
<IMG src="http://some.host/cgi-bin/get-img.cgi?uniquestamp-for-netscape"/>
If engine is 'not conformant' - just fine, no need to bother
with timestamp.
Rgds.Paul.
PS.
<aside>
Talking about some enterprize system which is using
XSLT on client-side? Oh - come on ....
</aside>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list