[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?

Subject: RE: most efficient way to check for a group of tags?
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 2 Mar 2005 21:08:23 -0000
xslt group tag
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/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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