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

Re: MSXML v. Saxon - whose bug?

Subject: Re: MSXML v. Saxon - whose bug?
From: Francis Norton <francis@xxxxxxxxxxx>
Date: Thu, 14 Sep 2000 10:36:37 +0100
msxml exposure
Andrew,

Thank you - I hadn't taken the trouble to figure out the spec first time
round, and made a mistake when I did try to do so. 

I found the fact that foo/bar and foo/* have the same priority to be a
bit counter-intuitive given the general thrust that more specific
matches should have higher priority, so having it illustrated as below
is very helpful.

(Another reason for reading the spec carefully is that anyone with prior
exposure to Prolog may, in a general way, expect first-match to take
precedence over last-match.)

Francis.


Andrew Kimball wrote:
> 
> Francis,
> 
> Here are some priority examples:
> 
> PATTERN                       PRIORITY
> foo                           0
> processing-instruction(foo)   0
> foo:*                         -0.25
> *                             -0.5
> node()                        -0.5
> text()                        -0.5
> comment()                     -0.5
> processing-instruction()      -0.5
> foo/bar                       0.5
> foo/*                         0.5
> foo[bar]                      0.5
> *[*]                          0.5
> */*                           0.5
> 
> Your mistake is in thinking that foo/* has a priority of -0.5.  Only
> patterns consisting of *just* a NodeTest have priority of -0.5.  As soon as
> you introduce filtering [] or composition /, that bumps the default priority
> up to 0.5 (because foo/* is more specific than foo or *).
> 
> ~Andy Kimball
> MSXSL Dev
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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