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

Re: document() on a node-set param variable?

Subject: Re: document() on a node-set param variable?
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Mon, 11 Feb 2002 18:56:56 +0000
xsl set param
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


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.