[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

  • From: David Carlisle <davidc@n...>
  • To: james_strachan@y...
  • Date: Fri, 27 Jul 2001 10:45:44 +0100

xpath namespace example

> (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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.