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

Preference rules for /something and /*

Subject: Preference rules for /something and /*
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Mon, 18 Jun 2007 22:07:58 +0200
 Preference rules for /something and /*
Hi List,

I'm not sure if I get this right, so I'm asking here. If I have the following two rules:

<xsl:template match="/root" />
<xsl:template match="/*" />

I receive an "ambiguous rule match" error if the input matches the first. I figured, '*' is not very selective, so it should've conceived lowest priority (I know that a single '*' has prio -.5). What I'd guess is that I am having a compound rule here, similar to 'node/child' or 'node/*' which both receive prio +.5, with the parent node being the document node. Am I correct? Or should a processor distinguish and select the first as having a higher prio (which intuitively seems more correct)?

Of course I can use priority='x', but I'm curious about the default prio here.

Thanks,
-- Abel

PS: the same happens when I over-specify the first rule, i.e.: /root[foo[bar='y']]

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.