|
Subject: RE: [xsl] Testing for Missing or Empty Tags From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Thu, 08 Jan 2004 15:05:14 -0500 |
Thanks, Wendell, Vasu, Michael, and David for your helpfule responses.
Am I correct that: 1)not(Tag[normalize-space()]) will treat all blanks as if it were empty text, whereas not(string(Tag)) will not?
[a] Tag[normalize-space()] or Tag[string()]
(short for child::Tag[normalize-space(self::node())] and
child::Tag[string(self::node())] )[b] string(Tag) or normalize-space(Tag)
(short for string(child::Tag) or normalize-space(child::Tag) ) ...2)If I had multiple sets of a given element, not(Tag[normalize-space()]) will return true for the following xml document because of the second Tag element, while not(string(Tag)) will return false since the first tag element has text?
<Xml> <Tag>somevalue</Tag> <Tag></Tag> <Tag>Another value</Tag> </Xml>
I hope this helps-- Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Testing for Missing or Em, Schwartz, Rechell R, | Thread | [xsl] mixture of XML and HTML in re, Larry_Mason |
| Re: [xsl] copying mixed xml, Manolis Mavrikis | Date | Re: [xsl] Obtaining a list of uniqu, Mukul Gandhi |
| Month |