You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2003/12/06 08:29:00 UTC

DO NOT REPLY [Bug 25260] New: - Transformation of non ASCII characters not possible

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=25260>.
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=25260

Transformation of non ASCII characters not possible

           Summary: Transformation of non ASCII characters not possible
           Product: XalanJ2
           Version: 2.5
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: org.apache.xalan.transformer
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: s.gorr@web.de


Impact:
If using transformation to String or the Process via command line the you can
not use all characters according to the set encoding. Furthermore properties for
the output element will not be applied on internal output fragments.
Thus the transformation will only work on ASCII characters or if encoded as
entities.
Therefore I personally think it is product critical and a blocker for all
international applications and I did not find any existing bugs on this topic.

Problem:
Within TransformerImpl.transformToString the serialization Handler is retrieved
via getInstance() if no free one is available on the object pool a new one will
be created but without the assigned attributes.
The comments in the code imply that the developer wanted to call the method
getInstanceIfFree instead because he added line to create a new instance if no
one was returned. 
The problem is that getInstance will always create a new one if no one has been
found thus the code will only work if there is something already in the pool.

Solution: 
Change the method call to:
    m_serializationHandler = (ToTextStream)
m_textResultHandlerObjectPool.getInstanceIfFree();

And add more test cases to assure conformance to the XML standard.

I would like to contribute some test cases and a patch but I have to study the
project processes first, that may take some time...