[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/12/10 9:54 AM, Wendell Piez wrote:
At 09:40 PM 11/11/2010, you wrote:The lowest-priority patterns are special in that you can exhaustively enumerate them all.A rule I find easy to remember is that a pattern has the highest default priority (0.5) if and only if it contains a "/", "//", or "[..]" For XSLT 1.0, I created a table listing these: http://lenzconsulting.com/how-xslt-works/#priority There are only 6 patterns (not including their alternate "child::" or "attribute::" forms) that have a default priority of -0.5. That's because it's the only default priority level where no names (or steps or filters) are used. XSLT 2.0 adds a few more to the list with the ElementTest and AttributeTest forms. I just noticed (from here: http://www.w3.org/TR/xslt20/#dt-default-priority) that in XSLT 2.0, "/" has priority -0.5, whereas it has +0.5 in XSLT 1.0. I was surprised to see this. Maybe it has no practical impact (other than invalidating my easy-to-remember rule). Or am I missing something? 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
|