Subject: Re: XPath and noname namespace
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 14 Jul 2008 16:10:16 +0100
|
I have simple document:<svg xmlns="http://www.w3.org/2000/svg">
<a>aadsf</a> </svg>
so the element there has name local name a in the namespace
http://www.w3.org/2000/svg
And now "//a" doesn't find a node
That selects elements with local name a in no namespace.
> I must use //*[local-name() ='a'],
That is possibly inefficient and selects any element with that local
name, a more usual approach is to say
I must use //svg:a where your stylesheet has
xmlns:svg="http://www.w3.org/2000/svg"
David
________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs.
________________________________________________________________________
|