Re: [xsl] Document() function

Subject: Re: [xsl] Document() function
From: Mike Brown <mike@xxxxxxxx>
Date: Thu, 15 Mar 2001 13:55:39 -0700 (MST)
Borca, Olivier wrote:
> I am looking for help about the 'document()' function but I didnt
> manage to find something good.
> Can anyone help me with that ?

If you call document() with one argument, the argument is coerced to a
string and is assumed to be a URI that identifies an XML document. That
document is parsed and its root node is returned by the
function. You might use it like this:

 <xsl:value-of select="document('foo.xml')/path/to/some/nodes"/>

or

 <xsl:variable name="foo" select="/path/to/element/containing/URI/text()"/>
 <xsl:value-of select="document($foo)/path/to/some/nodes"/>

You can use multiple arguments, but to learn about that, you should just
wait for Mike Kay's book to arrive in your mailbox!

   - Mike
____________________________________________________________________
Mike J. Brown, software engineer at            My XML/XSL resources: 
webb.net in Denver, Colorado, USA              http://skew.org/xml/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread