xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Xing <cx...@borland.com>
Subject Xalan serializer line separator
Date Tue, 06 Aug 2002 21:26:44 GMT

I am sure whether this is the right mailing list for Xalan issues.
I found the line separator proccessing of org.apache.xalan.serialize.SerializerToXML  is weird.

//here are some lines of code from that class
void writeNormalizedChars(char ch[], int start, int length, boolean isCData)
          throws IOException, org.xml.sax.SAXException

    int end = start + length;

    for (int i = start; i < end; i++)
      char c = ch[i];

      if (CharInfo.S_LINEFEED == c)
        m_writer.write(m_lineSep, 0, m_lineSepLen);

If my original CDATA section has \r\n,  the output will become \r\r\n on Windows.
I think \r  should be skipped first on Windows(\n should be skipped on Mac) before writting
out the normalized  line separators.

Chris Xing

View raw message