RE: [XSL-FO] newbish match question
>>XSLT and XPath questions would be better posted to the following list:I knew this would be mentioned. I've subscribed to many lists before but for
some reason mulberry's majordomo is not accepting the request, and I've
never had a problem submitting "subscribe ..." requests till now.
The omission of child:: is what was throwing me off.
<xsl:template match="//*[reg_set]"> to me just looks like your trying to
match any element (hence the *) whose name is "reg_set" (hence the "test" in
While the omission may be acceptable, I think I'll write it the long way to
make the code easier to read(?).
From: G. Ken Holman [mailto:gkholman@...]
Sent: Tuesday, July 30, 2002 10:05 AM
Subject: Re: [XSL-FO] newbish match question
XSLT and XPath questions would be better posted to the following list:
At 2002-07-30 09:51 -0500, Kristian R. Van Tassell wrote:
>I'm debugging a friend's XSLT stylesheet. I can't seem to decipher thisFind all element nodes in a node tree where such elements have at least one
"reg_set" element child. The omission of the "child::" axis inside of the
predicate is an accepted axis abbreviation.
>Is there a difference between the above and:Yes, the second expression finds all "reg_set" element nodes. The first
expression finds all their parent element nodes.
Note that "//" is *very* wasteful in processing time ... "//x" will find
all "x" elements but will also look inside all found elements looking for
more "x" elements beneath them, all the way to every leaf of the node
tree. A common way to improve the performance of many stylesheets is to
find and remove the use of "//" in them.
I hope this helps.
Upcoming hands-on in-depth 3-days XSLT/XPath and/or 2-days XSL-FO:
- North America: Sep 30-Oct 4,2002
- Japan: Oct 7-Oct 11,2002
G. Ken Holman mailto:gkholman@...
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995)
ISBN 0-13-065196-6 Definitive XSLT and XPath
ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath
ISBN 1-894049-07-1 Practical Formatting Using XSLFO
XSL/XML/DSSSL/SGML/OmniMark services, books (electronic, printed),
articles, training (instructor-live,Internet-live,web/CD,licensed)
Next public training: 2002-08-05,26,27,09-30,10-03,07,10
To unsubscribe from this group, send an email to:
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/