This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: document() on a node-set param variable?
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: hnorris norris <hnorrisalt at yahoo dot com>
- Cc: xsl-list at lists dot mulberrytech dot com, cmorris at arielpartners dot com
- Date: Mon, 11 Feb 2002 18:56:56 +0000
- Subject: Re: [xsl] document() on a node-set param variable?
- Organization: Jeni Tennison Consulting Ltd
- References: <20020211042311.29791.qmail@web14914.mail.yahoo.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi Holten,
> Is it possible to use the xslt document() function to get the root
> node of a non-file - in this case a tree passed in a as param? I'm
> successfully passing in my DOM Document tree as a param, but when I
> try to access the root node with document(), I get an error
> indicating it may think my param variable is a URL and trying open a
> file on disk.
>
> I would like to say something like
> select="document($paramDocumentName)/Properties/Value"
Given that $paramDocumentName is being successfully set to the root
node of the document you're interested in, all you should have to do
is:
$paramDocumentName/Properties/Value
You only need to use the document() function to retrieve a document
when you know its URL. So if $paramDocumentName were actually a
string, the URL of a document, *then* you would use:
document($paramDocumentName)/Properties/Value
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list