xsl-list
[Top] [All Lists]

RE: most efficient way to check for a group of tags?

2005-03-02 14:08:23
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(_at_)yahoo(_dot_)com] 
Sent: 02 March 2005 20:38
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] 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/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--