RE: TR/xquery-operators/#func-doc

> > However, the need for this coding technique will greatly
> > decline in XSLT
> > 2.0. It was used in XSLT 1.0 almost exclusively to handle 
> > fixed look-up
> > tables, which can be handled in XSLT 2.0 much more efficiently using
> > temporary trees held in global variables.
> 
> The classic of 
> <months>
>  <January>
>  ...
> 
> as a look up. 
> 
> I can't see how a temporary tree will help there?

Declaring a global variable containing the lookup data is much more flexible
and performant than using document("") to read XML lookup data from the
stylesheet.
> 
> I dislike this change.
> 
> E.g. when moving from a workstation development to a server, 
> the file location will need changing? Yes, it can be worked 
> round. The elegance of document('') is now well known and of 
> great utility.
> 
> Seems a bad decision to change it.
> 

But we haven't changed it! Calling document("") in XSLT 2.0 works exactly
the way it always did. You now have the option to set the base URI to
something other than the XML entity containing the stylesheet - but you
don't have to use that facility if it gets in your way.

Michael Kay 

Received on Wednesday, 14 May 2003 23:27:59 UTC