[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: [XSLT 1.0] Q: recursively eliminate empty nodes

Subject: Re: [XSLT 1.0] Q: recursively eliminate empty nodes
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Wed, 10 Nov 2010 09:16:58 +0000
Re:  [XSLT 1.0] Q: recursively eliminate empty nodes
Here's a breakdown of various types of XSLT 1.0 and XSLT 2.0 patterns
grouped by their default priority values.  (Someone please correct me
if any of this is either inaccurate or incomplete.)

Rather than referring to this list, it might be better to understand and memorize the principles.

Priority 0 is used when the node kind and either the name or type are known, but nothing else. This is the most common kind of pattern, so zero acts as the baseline.

Priority -0.5 is used when only the node kind is known (or in the case of node(), not even that), but the name is unknown.

Priority -0.25 (intermediate) is used when the node name is partially known (URI or local part, but not both).

Priority +0.25 is used when the node kind, name, and type are known

Priority +0.5 is used for everything else: typically, but not exclusively, when the pattern includes filters or constraints on the node's ancestory.

I just use identity template priority -9 as universal for life
I don't. Using the default priority has never given me any problems.

Michael Kay

Current Thread


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.
First Name
Last Name
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.