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 19840] New: - I18nTransformer parseError if date/time element only spaces
Date Mon, 12 May 2003 08:24:32 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=19840>.
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=19840

I18nTransformer parseError if date/time element only spaces

           Summary: I18nTransformer parseError if date/time element only
                    spaces
           Product: Cocoon 2
           Version: 2.1M1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: general components
        AssignedTo: cocoon-dev@xml.apache.org
        ReportedBy: michael.enke@wincor-nixdorf.com


If date or time element contains only white space, I get a parseException.
In 2.1-dev I could write:
<i18n:date-time>
  <xsp:attribute name="pattern">full</xsp:attribute>
</i18n:date-time>
but now I have to write all in one line, without any space.
This comes since the following code fragment was changed:

    private void i18nCharacters(String textValue)
            throws SAXException {
        if (textValue == null) {
            return;
        }
        // Trim text values to avoid parsing errors.
        textValue = textValue.trim();

The return should go behind the trim() and return if null or if length() == 0.
This was the case in 2.1-dev. Why it has changed?

Mime
View raw message