This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Selecting Parent Nodes with Empty Children
- From: "Hellstern, Manny" <manny dot hellstern at mustangeng dot com>
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Date: Mon, 8 Apr 2002 08:01:11 -0500
- Subject: RE: [xsl] Selecting Parent Nodes with Empty Children
- Reply-to: xsl-list at lists dot mulberrytech dot com
I tried the syntax in my jscript code but it generated an error. It looks
like it doesn't like the "-" in normalize-space. The expression
"//VALUE[normalize-space(.)='']" works when I check it using an XPATH
tester. Is there some type of character escaping that I may need to do to
use the expression in var
objNodes=objXML.selectNodes("//VALUE[normalize-space(.)='']")?
-----Original Message-----
From: J.Pietschmann [mailto:j3322ptm@yahoo.de]
Sent: Friday, April 05, 2002 3:35 PM
To: xsl-list@lists.mulberrytech.com
Subject: Re: [xsl] Selecting Parent Nodes with Empty Children
Hellstern, Manny wrote:
> Sorry for the poor phrasing. What I'd like to do is use an XPath
expression
> in some script to extract a nodeset of ONLY those nodes that meet the
> criteria. In otherwords, can an XPath expression look something like
>
> var objNodes = objXML.selectNodes("//VALUE[normalize-space(.)='']")
>
Yes, this will get you
<VALUE>dummy text</VALUE>
<VALUE>more text</VALUE>
> -----Original Message-----
It's considered good netiquette to trim unnecessary quoted
text.
J.Pietschmann
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list