[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: saxon xmlspy discrepancy in whitespace handling

Subject: Re: saxon xmlspy discrepancy in whitespace handling
From: Geert Bormans <geert@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 Jan 2007 11:02:52 +0100
Re:  saxon xmlspy discrepancy in whitespace handling
add a
<xsl:strip-space elements="*"/>
to your XSLT
and all the whitespace nodes you don't need will be deleted

by using apply-templates you pass all child nodes to the templates
also the white-space only text nodes
They are handled by the built in template for text nodes,
which means, they are copied to the result tree

Alternatively you could be selective in passing nodes to the templates
     <xsl:template match="/">
        <xsl:apply-templates select="//section" />
    </xsl:template>
This way the whitespace only textnodes are not passed to the templates

Altova has a weird way of dealing with white-space only text nodes
(they listed it as a bug in their documentation some 4 years ago, apparently they still were not able to solve it)


Cheers

Geert

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.