|
Subject: Re: [xsl] Null Values From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Thu, 29 Mar 2001 16:21:25 +0000 |
<xsl:template match="*">
<xsl:if test="normalize-space(.) or node()[not(self::text())]">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:if>
</xsl:template>Good luck, Wendell
My requirement is to remove tag names when I convert from one xml to another xml, if there is no data.
e.g
<F1>1234</F1>
<F2>1234</F2>
<F3></F3>
<F4>1234</F4>
to
<F1>1234</F1> <F2>1234</F2> <F4>1234</F4>
Is there any general method to do this, instead of checking node by node.
====================================================================== 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 -> |
|---|---|---|
| [xsl] Null Values, Lawrence Pravin | Thread | Re: [xsl] Null Values, Mike Brown |
| RE: [xsl] Tags to prevent from XSLT, Rajesh Kommineni | Date | RE: [xsl] value of an element, Jason Swalwell |
| Month |