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

Big Conditional XSL queries...

  • From: kgoss@i...
  • To: xml-dev@x...
  • Date: Mon, 19 Jun 2000 15:00:56 -0700

xsl search pattern
I'm having some problems finding some good examples for some advanced (for
me atleast) XSL search patterns.

I am working on a component that will use XSL to return a subset of a large
XML file so its more efficient.  The component will provide a simple
interface for searching by 4 or more 'variables', which can be tag or
attribute values.  If 1 or more is provided, then its an AND only search...
1 AND 2 AND 3 AND 4... etc.

My problem is that if I'm given a few different parameters, how can I easily
and efficiently build an XSL search pattern that accounts for various
positioning within the XML structure?

For instance, I might have somethign like:

<service name='MyFirstService'>
<client version='1.0'>WebApp</client>
<client version='3.0'>Desktop</cleint>

So if my component got passed teh ClientName, Version, and Service Name then
I want write an XSL pattern to search for ALL of these.  I have no problem
writing the patterns to find a particular set of XML by drilling down
(Services/Service[@Name='???']), but can I use a series of $and$ directives
to specify other positions in the heirarchy?    EG- Requiring Service@Name =
'???' but the Client Version, which exists within the Clients tag be equal
to a value also?  

I've been stuck on this for a while, and alot of samples I've found on MSDN,
don't do this... I'm wondering if I'm misunderstanding the technology and
this isn't the right way.

Thanks for any help,

Kristofer Goss

This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/


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.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.