[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
On 11/13/10 4:58 AM, G. Ken Holman wrote:
At 2010-11-12 23:18 -0800, Evan Lenz wrote:I think that paragraph serves a more explanatory than normative role. The algorithm described above it (in the bulleted list) does not include "/" as having a default priority of -0.5. Therefore it must be +0.5. You had me going for a second, until I saw this paragraph in the XSLT 2.0 Rec (item #17 under "Incompatibility in the Absence of a Schema"), which confirms the change: http://www.w3.org/TR/xslt20/#incompatibility-without-schema "The default priority of the pattern match="/" has changed from +0.5 to -0.5. The effect of this is that if there are any template rules that specify match="/" with an explicit user-specified priority between -0.5 and +0.5, these will now be chosen in preference to a template rule that specifies match="/" with no explicit priority; previously such rules would never have been invoked." Elsewhere Michael Kay responded: > Retaining the 1.0 priority would have meant match="/" having a higher priority than match="document-node(element(invoice))", which would be counter-intuitive. Thanks, Michael for explaining the rationale for the change. Makes perfect sense. I'll have to update my rule for XSLT 2.0: Except for "/" by itself, a pattern has the highest default priority (0.5) if and only if it contains a "/", "//", or "[..]" Evan -- Evan Lenz Lenz Consulting Group, Inc. http://lenzconsulting.com +1 (360) 297-0087
|
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
|