xsl-list
[Top] [All Lists]

Re: [xsl] XSL/XPath to generate a list of ancestors?

2008-05-17 10:57:26
Martin Honnen wrote:

  Hi

     <xsl:template match="*" name="fullNameWorker"
       mode="fullName">

You have a template for element nodes (match="*") so why do
you test
  generate-id(.) != generate-id(/)
? An element (.) is never a root node (/).

Because the template recursively ascends the document I need to
test that I have arrived at the top.

But your template with match="*" is never processed for the root
node which is match="/".

  This message was posted a few days ago, but I didn't see any response
to that, so just for the sake of comprehensiveness in the archive...

  I didn't looked at the details of the template, but having match="*"
is not enough to garantee that the context item is an element, when the
template has also a name.  This is one reason to try to avoid having
named template rules IMHO.

  Regards,

--drkm




















__________________________________________________
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible 
contre les messages non sollicités 
http://mail.yahoo.fr Yahoo! Mail 


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--