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

Re: document()

Subject: Re: document()
From: "M. David Peterson" <m.david@xxxxxxxxxx>
Date: Sat, 06 Nov 2004 18:33:40 -0800
Re:  document()
Hello Gabriel,

There are two ways to use the document() function. One is to use a string representation of the path to the directory in which the file is contained. To tell the processor that this is a string representation you need to use single quotes:

document('/mickel/XML/xml_file.xml')

Keep in mind that this will only work if 'mickel' is at the root of your directory. Another way to locate the correct file would be to use:

document('../../XML/xml_file.xml')

Your current approach tells the processor to locate the 'xml_file.xml' child element of /mickel/XML and use its value as a string representation of the file to use which, if it does not exist, will simply be ingored and leave you with an empty string for the document() function to work with. Obviously an empy string doesnt do a lot for you.

Hope this helps!

Regards,

<M:D/>


Gabriel K. wrote:


I want to open an xml file that resides in a folder that is a above the xsl file in which document() is used (to access the xml file).

The XSL file resides here (under the web root):
/mickel/XSL/PC/

and the XML file resides here (under the web root);
/mickel/XML


I have tried to use document(/mickel/XML/xml_file.xml), but it doesn't seem to work. Should this work? Can I reference the web root folder with "/"?




/Gabriel

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.