Re: [xslt] namespace bug ?



On Wed, Nov 05, 2003 at 01:53:24PM +0100, Bernhard Zwischenbrugger wrote:
> The xpath "test:a" works well, but isn't it the same as "a" without 
> a prefix?

  The answer is clearly no from the XPath spec. As said previously
a without a prefix in an XPath expression can only select non-namespaced
nodes, and a default namespace is a namespace. It is not a regexp matching
it's a logical matching.
   Reread http://www.w3.org/TR/xpath#node-tests
"A QName in the node test is expanded into an expanded-name using the
 namespace declarations from the expression context. 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"

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]