Re: [xsl] Preference rules for /something and /*

Subject: Re: [xsl] Preference rules for /something and /*
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Tue, 19 Jun 2007 17:59:03 +0200
Wendell, David,

Thank you both for your clear and extensive answers, it clarifies it all :)

Cheers,
-- Abel

Wendell Piez wrote:
Abel,


Yes. Both of these fall into the "anything else" category. There are three categories:


1. Simple tests by name, on the child or attribute axis in a single step
   e.g. "root" or "@root" -- priority 0
2. "Wildcard" matches on the child or attribute axis in a single step
   e.g. "@*" or "comment()" -- priority -0.5
3. Anything else
   e.g. "//root", "/root", "/*/root" or "/*" -- priority 0.5

(There's also a category between rules 1 and 2: a match on a namespace-and-type, with a single step, such as "html:*" or "svg:node()", gets priority 0.25.)

<snip />

Current Thread