[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Selecting based on Element AND attrib value?
On Wed, 21 Jun 2000 kgoss@i... wrote: > I'm pulling back a subset of XML that resembles this: > > <Clients> > <Client version="1.0">App1</Client> > <Client version="2.3">App2</Client> > <Client version="4.0.0">App3</Client> > </Clients> > > My XSL select goes select="Clients[Client='App1']" > > In the next step, I try to check that the version attribute is correct, by > going: > > When I try to check the version is what I need it to be, by doing: > > select="Client[@version='4.0.0']", my XSL still returns the record because > it FINDS a node with the attribute of 4.0.0 in it, rather than > finding me a Client name App1 with its version equal to 4.0.0; I can't seem > to say "Get me a client = to X AND have its version = Y" in my > query. You can have multiple predicates on a location step: "Clients[Client='App1'][Client/@version='4.0.0']" *************************************************************************** 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
|