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

Re: Search XML using XSL

Subject: Re: Search XML using XSL
From: Mike Brown <mike@xxxxxxxx>
Date: Sat, 7 Jun 2003 09:50:59 -0600 (MDT)
xsl search xml
thei wrote:
> It's just occurred to me that I should be able to use XSL to search an
> XML file, so I played around with things like contains(), but then
> realised I can't search more than one XML file or with more than one
> search term so I thought I'd ask here.
> 
> I'd like to be able to search a set of XML files for "word1 word2" and
> have all elements that contain both "word1" and "word2" in any order
> returned. Or even just in that exact order. I can't work out how to
> search more than one XML file at a time.

Investigate the use of document('foo.xml') to get the root node of an
arbitrary XML document, when given the document's URI. You can put the URIs in
elements in a separate document and iterate over them with for-each. Note that
every document you access via document() will be loaded into memory and most
likely kept there for the duration of processing, so XSLT is not ideal for
this job if you have many or large XML docs. You should look into writing a
SAX application. It'll be much faster and more efficient, but you will have to
get your hands dirty with lower-level programming.


 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.