OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Big Conditional XSL queries...

[ Lists Home | Date Index | Thread Index ]
  • From: kgoss@interactcommerce.com
  • To: xml-dev@xml.org
  • Date: Mon, 19 Jun 2000 15:00:56 -0700

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:

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

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@xml.org&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS