[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Loading an external file of index

Subject: Re: Loading an external file of index
From: Paul Tchistopolskii <paul@xxxxxxx>
Date: Wed, 28 Jun 2000 01:37:51 -0700
xslt external files
> > 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.