1. Joerg Heinicke wrote:

> > It also contains a nice trick for outputing a non-blanking space from
> > an XSLT stylesheet:
> >
> >   <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
>
> sorry, but it's really a bad trick. I wonder that it's working in Cocoon,
> because a while ago disable-output-escaping was not supported in Cocoon,
> because you can create non-well-formed XML with it, what's real bad for
> pipelining.

I agree.. assuming you're using disable-output-escaping to creade
tag-like 
constructs. The reasons you describe for not using
disable-output-escaping 
are not the complete story. The more general problem is that 
disable-output-escaping can be used to create XML tags which are then
emited 
(say via a cocoon pipeline) as character data events rather than element 
events, which is probably not what the programmer indended.

In this case we're generating a space, which is text and emitted as 
character data, so we're fine. But you're right to point out that we
shouldn't provide examples which encourage bad habits.

> Instead of the above use &160; (the entity, to which &nbsp; is mapped 
> in HTML). Is much shorter, better coding and does not use 
> disable-output-escaping.

Yup.. much shorter. I'll update the page with a note about this. 

----------

2. Jens Lorenz wrote:

> > P.S. Is there a Wiki expert that can explain to me how to embed
> > '&nbsp;' and '&amp;' in a Wiki page so that it display correctly?
>
> Did you just try to simply double your trick ? 
>
>   &amp;amp;&amp;nbsp;
>
> This worked for me in preview mode ... (didn't dare to save though)

Nice one... and it didn't even break the Wiki! It works, but has that
problem that if you re-edit the page then all the leading &amp;'s get 
lost and you have to re-enter them all again. This is particularly
nasty if some else edits a page and doesn't know to do this.

It'd be nice if the Wiki had a way of ascaping characters that didn't 
get lost on re-editing. Coolest would be if we could enter \&amp;
and have it come back when we edit again.

-----------

Thanks to you both and best wishes,

Alan.

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to