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

Re: Use of Document Function to search in *.xml files

Subject: Re: Use of Document Function to search in *.xml files
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 13 Nov 2002 11:28:12 -0500
document function xml
Saurabh,

At 08:35 AM 11/13/2002, you wrote:
Can xsl:document funtion take (e:\base\*.xml)as input?

If you're asking whether the expression document('e:\base\*.xml') will work, the answer is no, since the string argument violates URI syntax.


If you're asking whether document('*.xml') works, it's still no, for the same reason. XSLT really doesn't want to specify a language for traversing a file system, so it uses URI syntax; URIs don't use wildcards.

However, the document() can take a node set argument, so you can do

document(file)

in a context where your source has children

<file>one.xml</file>
<file>two.xml</file>
<file>three.xml</file>

and get them all that way.

Of course, it may be convenient to put the file list somewhere other than your source document. In which case, naturally, you retrieve the node set with a document() function. As in:

<xsl:variable name="filenames" select="document('filelist.xml')//file"/>

and then call document($filenames), and voila.

I hope that helps,
Wendell


====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================


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.