cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathaniel Alfred" <Alfred.Nathan...@swx.com>
Subject RE: Why does XSPMarkupLanguage wrap text in xsp:text?
Date Fri, 10 Jun 2005 20:34:41 GMT
>-----Original Message-----
>From: Jochen Kuhnle [mailto:lists@kuhnle.net]
>Sent: Mittwoch, 8. Juni 2005 19:04
>To: dev@cocoon.apache.org
>Subject: Re: Why does XSPMarkupLanguage wrap text in xsp:text?

>Hope I'm not too annoying on this issue, but on further work on logic 
>sheets, I believe the auto-wrapping is not only complicating 
>things a bit, it is actually introducing problems.
>
>ContentHandler.characters specification [1] says that the character data 
>can be fed in chunks, so autowrapping text ".a..b..c..d." ('.' stands for 
>space) might not rsult in <xsp:text>.a..b..c..d.</xsp:text>, but in 
><xsp:text>.a..b..c</xsp:text><xsp:text>..d</xsp:text> or some
other 
>"partitioning". It actually gets chunked in the current implementation if 
>there are newlines in the text.
>
>Now consider e.g. the python xsp.xsl, which has a "space='strip'" option, 
>where the template for xsp:text does a normalize-space(). So partitioning 
><xsp:text>.a..b..c..d.</xsp:text> results in "a.b.c.d", while partitioning

><xsl:text>.a..b</xsl:text><xsl:text>..</xsl:text><xsl:text>c..d.</xsl:text>

>results in "a.bc.d". 
>
>I would think there are some more side effects like this somewhere, so I 
>would suggest either fixing the PreProcessFilter, so it fixes chunking, or 
>remove it alltogether.
>
>Regards,
>Jochen

I can only guess that the autowrapping was intended to allow logicsheets
match="xsp:text/text()" for text content and match="text()" for program
code.  It remains a mystery to me why none of the builtin logicsheets 
actually uses this.

Removing the autowrapping may break a few custom logicsheets depending
on this, but since it is a rather obscure feature nowhere mentioned in
the user docs, I am +1 for dropping the autowrapping.  Is does indeed
make logicsheet input more predictable.

Cheers, Alfred.
 
 
This message is for the named person's use only. It may contain confidential, proprietary
or legally privileged information. No confidentiality or privilege is waived or lost by any
mistransmission. If you receive this message in error, please notify the sender urgently and
then immediately delete the message and any copies of it from your system. Please also immediately
destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail communications through their
networks. Any views expressed in this message are those of the individual sender, except where
the message states otherwise and the sender is authorised to state them to be the views of
the sender's company.

Mime
View raw message