[ 
https://issues.apache.org/jira/browse/XERCESJ-1241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Glavassevich resolved XERCESJ-1241.
-------------------------------------------

    Resolution: Invalid

 is only allowed in an XML 1.1 document.  In other words, it must have an 
XML declaration of the form <?xml version="1.1" ...?>.  The XML version of the 
DOM you're serializing is "1.0".  It's not well-formed.  I suppose Xalan 
doesn't check that, so you'll only get an error later when you try to read the 
document.  I just took a quick look and it seems that Xalan is missing support 
for serializing XML 1.1 documents or at least isn't respecting the the 
xmlVersion of the Document node.

To get this working, I suggest that you set the xmlVersion [1] of the Document 
node to "1.1" and use the DOM Level 3 LSSerializer [2] (which supports XML 1.1) 
for serializing the DOM.

[1] 
http://xerces.apache.org/xerces2-j/javadocs/api/org/w3c/dom/Document.html#setXmlVersion(java.lang.String)
[2] 
http://xerces.apache.org/xerces2-j/javadocs/api/org/w3c/dom/ls/package-summary.html

> Parser does not accept unicode character #x1
> --------------------------------------------
>
>                 Key: XERCESJ-1241
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1241
>             Project: Xerces2-J
>          Issue Type: Bug
>    Affects Versions: 2.9.0
>            Reporter: Olaf Märker
>         Attachments: Test.java
>
>
> The parser does not accept the unicode character #x1. I recieve this charcter 
> from an application and store it in an xml file with xalan. In the xml file 
> it is then  encoded as &#1; But when parsing the file I get the message:
> Character reference "&#1;" is an invalid XML character.
> As it is stated in section 2.2 of the XML 1.1 recommendation XML processors 
> MUST accept this character.
> http://www.w3.org/TR/2006/REC-xml11-20060816/#charsets

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to