xsl-list
[Top] [All Lists]

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

2010-11-13 06:59:03
At 2010-11-12 23:18 -0800, Evan Lenz wrote:
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.

That's not my read from:

  http://www.w3.org/TR/1999/REC-xslt-19991116#conflict
  "Patterns less specific than this (patterns that just tests
   for nodes with particular types) have priority -0.5.

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?

That "/" tests for a root node (a node with a particular type)?

I hope this helps.

. . . . . . . . . . . . Ken

--
Contact us for world-wide XML consulting & instructor-led training
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
G. Ken Holman                 mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>