xsl-list
[Top] [All Lists]

Resolving ambiguities when overriding the identity rule (Was: RE: Counting nodes efficiently )

2004-02-19 06:06:59
Thanks to Dave Pawson I was alerted that this code raises a recoverable
error (e.g. in Saxon 6.5.3: 

"Recoverable error
Ambiguous rule match for /nums[1]
Matches both "@* | node()" on line 5 of file:/(Untitled)
and "*" on line 26 of file:/(Untitled)")


Maybe I'm limited in some way, but I do hate to use priority (probably
because setting explicit values strongly goes interferes with the
otherwise implicit process of template matching).

This is why here's a cheat:

Replace:

  <xsl:template match="*">

with

  <xsl:template match="*[true()]">


Now everybody must be happy... Or are they?


Cheers,
 
Dimitre Novatchev 
FXSL developer,

http://fxsl.sourceforge.net/ -- the home of FXSL
Resume: http://fxsl.sf.net/DNovatchev/Resume/Res.html


__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

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



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