[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Big Conditional XSL queries...
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@x...&BODY=unsubscribe%20xml-dev List archives are available at http://xml.org/archives/xml-dev/ ***************************************************************************
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|