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

Having trouble installing Oxygen? Got a bug to report? Post it all here.
tricky
Posts: 2
Joined: Fri Aug 15, 2003 5:13 pm
Location: Haarlem, Netherlands
Contact:

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

Post 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
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post 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
tricky
Posts: 2
Joined: Fri Aug 15, 2003 5:13 pm
Location: Haarlem, Netherlands
Contact:

Post 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...?
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post 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
Post Reply