|
Subject: Re: [xsl] Stripping empty elements while still conforming to DTD From: Geert Josten <Geert.Josten@xxxxxxxxxxx> Date: Wed, 28 Sep 2005 17:41:31 +0200 |
<xsl:template match="*">
<xsl:if test="child::* or (string-length(.) != 0)">
<xsl:copy>
<xsl:apply-templates match="@*|node()" />
</xsl:copy>
</xsl:if>
</xsl:template>Is there a simple way to strip empty elements from an XML while still conforming to the requirements of the DTD? I know how to use the string() function to copy only those elements that contain data, but this often removes child elements required by the DTD.
Thanks for your help.
Stone
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Stripping empty elements whil, watchstone@xxxxxxxxx | Thread | Re: [xsl] Stripping empty elements , andrew welch |
| Re: [xsl] Specifying the XHTML XMLN, David Carlisle | Date | Re: [xsl] Specifying the XHTML XMLN, knocte |
| Month |