This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: NewBe help!
- To: "Joseph C. Koster" <jkoster at uhl dot uiowa dot edu>
- Subject: Re: [xsl] NewBe help!
- From: Jeni Tennison <mail at jenitennison dot com>
- Date: Fri, 3 Aug 2001 15:35:04 +0100
- CC: xsl-list at lists dot mulberrytech dot com
- Organization: Jeni Tennison Consulting Ltd
- References: <200108022103.f72L3QZ05365@franklin.uhl.uiowa.edu>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi Joe,
> I have just started useing xsl/xml and I haven't puchased a book yet
> how does the syntax work with the document() function when you use
> two variables?
Basically if you pass a relative URI as the value of the first
argument, then you need to resolve that relative URI somehow. If you
don't give a second argument, then the relative URI is resolved
relative to the stylesheet. If you do give a second argument (which
has to be a node), then the relative URI is resolved relative to the
"base URI" of the node, which is usually the same as the URI of the
entity that the node came from.
Typically, you'd use the second argument of the document() function if
the XML document you're processing contains URLs and is in a different
directory from the stylesheet. Then you'd use something like:
document($URL, .)
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list