[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

how to select elements in a given namespace?

Subject: how to select elements in a given namespace?
From: "Robert P. J. Day" <rpjday@xxxxxxxxxxxxxx>
Date: Mon, 17 Mar 2003 15:11:54 -0500 (EST)
 how to select elements in a given namespace?
  [xpathtester is steadfastly refusing to be helpful since it does
not highlight selected nodes based on attributes or namespaces.]

  from tidwell's book, if i have an excerpt from an XML file:

  <auth:author xmlns:auth=...>
   <last-name>...
   <first-name>...
   <nationality>...
   <year-of-birth>...
   <year-of-death>...
  </auth:author>

if i want to select all nodes in a given namespace ("auth"), it
appears i can use:

  //namespace::auth

and while xpathtester refuses to highlight the matches, it does at least
tell me there were 6 of them.  i'm assuming that these matches are the
auth:author element itself, and the 5 children, right?

  so what is the XPath expression to match, say, the <last-name> elements
within this namespace?

  i've tried a number of variations, and nothing has successfully matched.
i'm open to suggestions.  i've used predicates involving local-name() and
all kinds of things.

rday


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

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
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.