|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: most efficient way to check for a group of tags?
One of the big hopes for schema-aware XSLT 2.0 is that when this situation arises, its because tag1, tag2, etc are subtypes of some common supertype, and that you can then change the rule to say /child::schema-element(xyz) where xyz is an abstract element with tag1, tag2 etc in its substitution group. When this works, it should start to enable you to get the same kind of efficiencies from programming at a more abstract level that are familiar from object oriented programming. Sorry if this isn't a practical option in your case - you'll just have to spell out the list. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: Sebastien Boisvert [mailto:sebastienboisvert@xxxxxxxxx] > Sent: 02 March 2005 20:38 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: most efficient way to check for a group of tags? > > I've got a template that needs to know the if it > contains only 1 of a specific group of tags when it's > within a "content" tag, and I've got this condition to > do this: > > count(ancestor::content[1]/child::*[self:tag1 or > self:tag2 or self:tag3 ....]) = 1 > > Now I need to check for about 15 different tags; is > there a more efficient way to do this sort of check? > > > > > > > __________________________________ > Celebrate Yahoo!'s 10th Birthday! > Yahoo! Netrospective: 100 Moments of the Web > http://birthday.yahoo.com/netrospective/
|
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
|

Cart








