Read XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition Online
Authors: Michael Kay
Take care when using the
self::
axis. You can write
self::title
to test whether the context node is a
self::@title
to test whether it is a
title
attribute. This is because
@
is short for
attribute::
, and
self::attribute::title
doesn't make sense: you can either look on the self axis or the attribute axis, but not both at once. Write
self::attribute(title)