RE: Selecting Parent Nodes with Empty Children
This is a little off topic but have you set the objNodes.SelectionLanguage property to XPath ? See the below link,the default SelectionLanguage for XML 3.0 is XSLPattern and may not support your Xpath from below. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk30/ht m/xmmthsetproperty.asp Regards, Ben -----Original Message----- From: Hellstern, Manny [mailto:manny.hellstern@xxxxxxxxxxxxxx] Sent: 08 April 2002 14:01 To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx' Subject: RE: Selecting Parent Nodes with Empty Children 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@xxxxxxxx] Sent: Friday, April 05, 2002 3:35 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: 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 ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs SkyScan service. For more information on a proactive anti-virus service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________ =========================================================== Pulse Software Systems Limited. Pulse House, 5 & 7 Gravel Hill, Leatherhead, Surrey. KT22 7HG Tel: (01372) 220600 Fax: (01372) 362476 Web: http://www.pulsesoftware.co.uk This e-mail (and any attachments) may contain confidential or privileged information. If you are not the intended recipient or you receive this message in error please notify us immediately and delete the e-mail. Should this be the case then you are notified that any dissemination, distribution, or copying of this communication and its attachments is strictly prohibited. This message has been checked for all known viruses by the Message Labs Virus Scanning Service. For further information visit http://www.messagelabs.com/stats.asp Neither Pulse Software Systems nor the sender accepts any liability or responsibility for viruses or for any damage you may sustain. You should perform your own virus checks before opening any attachments. =========================================================== XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format