[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: quick XPath question: finding /a/b/c with a default namespace
> (Strictly speaking maybe > XPath questions should be sent to the XSL mail list?) (probably, and this answer will be in the FAQ for that list) > Should the path ..find the <c> element? No. For the reason you give, the default namespace is not used in the Xpath. But you misunderstand the meaning of > <a xmlns="dummyNamespace"> > So the default namespace is not used and none of the QNames in the document > or the path have namespace prefixes, so the namespace URI is null for all > the QNames. whether or not a prefix is used has no effect on the namepace URI. The namespace URI on all of the elements a b and c in your example is dummyNamespace, so the Xpath you require is x:a/x:b/x:c where x: is the prefix assigned to the namepace URI dummyNamespace in the stylesheet. David _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|