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

xpath question

Subject: xpath question
From: Brian Dupras <briand@xxxxxxxxxxx>
Date: Mon, 28 Feb 2000 15:56:51 -0700
xpath ns
This is a sanity-check type question...

given two similar xml docs (specific difference is the documentElement):

<ns:one>
  <ns:metadata>
	<ns:ignore-me/>
  </ns:metadata>
  <ns:data>
	<ns:foo ns:attr='abc123'/>
	<ns:bar ns:attr='abc456'/>
	<ns:baz ns:attr='abc789'/>
  <ns:data>
</ns:one>

<ns:two>
  <ns:metadata>
	<ns:ignore-me/>
  </ns:metadata>
  <ns:data>
	<ns:foo ns:attr='abc123'/>
	<ns:bla>
		<ns:bar ns:attr='abc456'/>
	</ns:blah>
	<ns:baz ns:attr='abc789'/>
  <ns:data>
</ns:two>

I would like to use xpath to create nodelist of any decendant ns:* elements
under ns:data that have a non-null ns:attr.  Is this the syntax I'd want?
(Note that these examples above are fairly simplistic.)

Context Node:	<ns:one> or <ns:two>
XPath:		"ns:data//ns:*[@ns:attr != '']"


Brian Dupras
Centera Information Systems, Inc.
phone 303.381.4420 (direct)
phone 303.939.0200 (operator)
fax	303.939.0111
web	http://www.centera.com
email	briand@xxxxxxxxxxx


 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.