This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
xpath question
- To: "XSL - Mulberry (E-mail)" <XSL-List at mulberrytech dot com>
- Subject: xpath question
- From: Brian Dupras <briand at centera dot com>
- Date: Mon, 28 Feb 2000 15:56:51 -0700
- Reply-To: xsl-list at mulberrytech dot com
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@centera.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list