|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Stripping empty elements while still conforming to
On 9/28/05, watchstone@xxxxxxxxxxx <watchstone@xxxxxxxxxxx> wrote: > 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. You mean text() right? And how can you make choices in the stylesheet based on the DTD - the stylesheet doesn't know about the DTD. If you mean you don't want to copy nodes without any children through to the output, then you want a no-op template: <xsl:template match="*[not(node())]"/> ...or something similar, depending on the rest of your stylesheet. An example of what you are trying to achieve would be good here.
|
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
|

Cart








