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 lifeI don't. Using the default priority has never given me any problems.
Michael Kay Saxonica
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