XPath examples in the spec.

Chapter 6 of the spec. has some XPath examples.  The following
is one of them:

       <Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
         <XPath>(//. | //@* | //namespace::*)[not(ancestor-or-self::Signature)]
         </XPath>
       </Transform>

This expression has element name 'Signature' without a prefix.
Accoding to XPath 1.0, non-prefixed name like it must not have
namespace.  This example does not work because the Signature
element must have the 'http://www.w3.org/2000/02/xmldsig#'
namespace.

I think that we can write like '*[local-name()="Signature" and
namespace-uri() ="http://www.w3.org/2000/02/xmldsig#"' in such
cases.


Third paragraph of http://www.w3.org/TR/1999/REC-xpath-19991116#node-tests
	This is the same way expansion is done for element type
	names in start and end-tags except that the default
	namespace declared with xmlns is not used: if the QName
	does not have a prefix, then the namespace URI is null.

-- 
TAMURA Kent @ Tokyo Research Laboratory, IBM

Received on Monday, 19 June 2000 20:44:15 UTC