cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Kuhnle <>
Subject Re: Why does XSPMarkupLanguage wrap text in xsp:text?
Date Wed, 08 Jun 2005 17:03:48 GMT
Vadim Gritsenko <> wrote on 07.06.2005 14:34:36:

> > 
> >>I guess original idea was that text() nodes can be safely ignored, 
> >>xsp:text nodes are meaningful. It might be still true, haven't 
> >>digged deeper...

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 

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.




View raw message