[PATCH]: Issues with DOM L3 "entities" and "infoset" parameters.
----------------------------------------------------------------

                 Key: XALANJ-2343
                 URL: http://issues.apache.org/jira/browse/XALANJ-2343
             Project: XalanJ2
          Issue Type: Bug
          Components: DOM, Serialization
            Reporter: Michael Glavassevich


Setting the "infoset" parameter to true with the current code in SVN causes the 
following exception when you try to serialize a document.

java.lang.RuntimeException: The resource [  ] could not load: 
java.lang.NumberFormatException: Listing</title> 
         java.lang.NumberFormatException: Listing</title>
        at org.apache.xml.serializer.CharInfo.<init>(CharInfo.java:302)
        at org.apache.xml.serializer.CharInfo.<init>(CharInfo.java:173)
        at org.apache.xml.serializer.CharInfo$1.run(CharInfo.java:465)
        at java.security.AccessController.doPrivileged(Native Method)
        at 
org.apache.xml.serializer.CharInfo.getCharInfoBasedOnPrivilege(CharInfo.java:462)
        at org.apache.xml.serializer.CharInfo.getCharInfo(CharInfo.java:526)
        at org.apache.xml.serializer.ToStream.setOutputFormat(ToStream.java:603)
        at 
org.apache.xml.serializer.dom3.LSSerializerImpl.write(LSSerializerImpl.java:958)

This exception occurs because the LSSerializer is trying to use the 
OutputPropertiesFactory.S_KEY_ENTITIES for a different purpose than it was 
intended to select whether or not to preserve entities in the document.  The 
attached patch switches the code over to using a different non-conflicting 
property name and also fixes a bug in handling the "infoset" property. Setting 
the "infoset" property to false is supposed to have no effect, but we're 
setting the properties anyways as if "infoset" were set to true.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to