[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: Andrew Kimball <akimball@xxxxxxxxxxxxx>
Date: Wed, 13 Sep 2000 11:02:46 -0700
RE: MSXML v. Saxon - whose bug?
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

-----Original Message-----
From: Francis Norton [mailto:francis@xxxxxxxxxxx]
Sent: Wednesday, September 13, 2000 6:54 AM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: Re: MSXML v. Saxon - whose bug?




Francis Norton wrote:
...
> I've got to admit that I often sort out these template priority
> questions by testing it then against a good parser, but these two are
> giving me different results!
> 
> Any thoughts as to who's got the spec on their side?
> 

I should add that my workround is to add a priority atribute to the
intruding template, thus:

---
  <!-- and generate "attribute" elements with the rest... -->
  <xsl:template match="itemStatus/*" priority="0">
    <attribute name="{name(.)}"><xsl:value-of
select="text()"/></attribute>
  </xsl:template>
---

which makes both MSXML3 and Saxon behave as if it was Saxon with a
default priority.

My (inexpert) reading of http://www.w3.org/TR/xslt#conflict (section
5.5.2) is that it *should* have a default priority of -0.5, which makes
me think that the problem may be with MSXML3 in this case.

Francis.
-- 
Francis Norton.

Defy Convention? Deify Convention!


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


 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.