Page 1 of 1

<xsl:text> </xsl:text> gets <xsl:text/>

Posted: Fri Aug 15, 2003 5:14 pm
by tricky
Hi all,

I'm having the problem that, when using <xsl:text> </xsl:text> (to put a space in the text) and click the format and indent button, my tags get changed to <xsl:text/>, so I lose my space! Anything to do about it? Thanks!

Patrick

Posted: Fri Aug 15, 2003 5:41 pm
by george
Hi,

You can use

Code: Select all


<xsl:text xml:space="preserve"> </xsl:text>
or

Code: Select all


<xsl:text><![CDATA[ ]]></xsl:text>
Best Regards,
George

Posted: Fri Aug 15, 2003 6:25 pm
by tricky
Thanks for your quick response!

However (to be a pain in the ass :D ), wouldn't it be handy to leave everything between <xsl:text> and </xsl:text> intact...?

Posted: Fri Aug 15, 2003 6:47 pm
by george
Hi,

There may be cases when you want to use xsl:text and not preserve the spaces, for instance if you edit an XSLT to output HTML and you have a large text content for xsl:text.

We have an entry on bugzilla to allow the user to edit a list of elements that should be treated as if they have an xml:space="preserve" attribute, that is preserve the spaces for a defined lis of elements.

Best Regards,
George