This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]