cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 27176] New: - [PATCH] optional removal of XSP-introduced extra whitespace
Date Mon, 23 Feb 2004 20:17:09 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27176>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27176

[PATCH] optional removal of XSP-introduced extra whitespace

           Summary: [PATCH] optional removal of XSP-introduced extra
                    whitespace
           Product: Cocoon 2
           Version: Current CVS 2.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: core
        AssignedTo: dev@cocoon.apache.org
        ReportedBy: guillaume@anyware-tech.com


With this patch, extra whitespace introduced between tags in XSPs will not
propagate into the resulting XML document: that is _no_ SAX "characters"
function calls that create _only_ whitespace will be created (see #6789 for
details on this problem) and other whitespace will be trimmed.

This behaviour is switched on by adding a "space" attribute on the xsp:page root
element with the value "strip". Anything other will keep the default behaviour,
so compatibility is OK I think.

Basically it works the same as the default whitespace-stripping in XSLT.
There may be a need for an equivalent of <xsl:text/> but this is not provided by
this patch. It seems <xsp:text/> tags can already used inside <xsp:attribute/>:
perhaps it has the wanted semantics, then that would be a good candidate for the
name.

Note that this patch does _not_ affect the source formatting of your Java class,
so the same principle could be applied to whitespace-sensitive languages like
Python...

Mime
View raw message