| Subject: RE: [xsl] follow-up: document function issue - relative URIs From: "Michael Kay" <mhk@xxxxxxxxx> Date: Tue, 8 Jun 2004 10:25:38 +0100 | 
> 
> > Remember that document(.) interprets the URI relative to the source
> > document, while document(string(.)) interprets it relative to the
> > stylesheet.
> 
> what is actually the difference between "the source document" 
> and the "stylesheet"? 
> 
> should an xslt processor (also 1.0 processors like Xalan or 
> Saxon 6.x) resolve the URI parameter of a document function 
> call - e.g. document('somedir/somefile.xml') - normally 
> relative to the stylesheet in which the call is in? 
The rules for the document() function are explicit: if the first argument is
a node-set, the URI is resolved relative to the node (typically in a source
document) that contains the URI in question; if the argument is a string,
then the URI is resolved relative to the base URI of the element in the
stylesheet containing the call to document().
Michael Kay
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| follow-up: document function issue , christof.hoeke | Thread | RE: [xsl] document function issue.., Markus Gamperl | 
| RE: [xsl] document function issue.., Markus Gamperl | Date | AW: [xsl] follow-up: relative URIs, christof.hoeke | 
| Month |