xsl-list
[Top] [All Lists]

Preserving whitespace between elements

2005-12-09 14:11:03
Hello,

I am having a problem with whitepsace getting stripped. Take the following example:

xsl stylesheet:
<xsl:template match="div|p|b|u|i">
   <xsl:copy><xsl:apply-templates/></xsl:copy>
</xsl:template>

xml:
<div><p>here is some <b>bold</b> and <i>italic</i> text</p></div>

My expected output was:
<div><p>here is some <b>bold</b> and <i>italic</i> text</p></div>

However, the space is getting stripped, so the actual output is:
<div><p>here is some <b>bold</b>and<i>italic</i>text</p></div>

Any suggestions on how to prevent this?

Thanks,
-- Matthew

--~------------------------------------------------------------------
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>
--~--



<Prev in Thread] Current Thread [Next in Thread>