xsl-list
[Top] [All Lists]

Re: [xsl] saxon xmlspy discrepancy in whitespace handling

2007-01-17 03:03:43
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



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--