You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Neil Hyde (JIRA)" <xm...@xml.apache.org> on 2005/07/25 20:33:42 UTC

[jira] Created: (XMLBEANS-183) Invalid XML generated by XMLBeans

Invalid XML generated by XMLBeans
---------------------------------

         Key: XMLBEANS-183
         URL: http://issues.apache.org/jira/browse/XMLBEANS-183
     Project: XMLBeans
        Type: Bug
    Versions: Version 1.0.3    
 Environment: Windows XP, JDK 1.4
    Reporter: Neil Hyde


The > character is not escaped by XMLBeans. This is not normally a problem unless it's preceeded by ]], in which case the resultant ]]> string is deemed to be markup (end of CDATA section). But what if ]]> is part of the content I'm trying to output. How can I get XMLBeans to escape the > char in this case, so that the resultant ]]&gt; string is correctly interpreted as content rather than markup when it's subsequently parsed.

-- 
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: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Commented: (XMLBEANS-183) Invalid XML generated by XMLBeans

Posted by "Radu Preotiuc-Pietro (JIRA)" <xm...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XMLBEANS-183?page=comments#action_12317666 ] 

Radu Preotiuc-Pietro commented on XMLBEANS-183:
-----------------------------------------------

I know, I have noticed that just a couple of weeks before your reporting it ;-) It's not intuitive and in fact, in the spec it says that it's for SGML compatibility as I recall. So yeah, this needs to be fixed, thanks for reporting!

> Invalid XML generated by XMLBeans
> ---------------------------------
>
>          Key: XMLBEANS-183
>          URL: http://issues.apache.org/jira/browse/XMLBEANS-183
>      Project: XMLBeans
>         Type: Bug
>     Versions: Version 1.0.3
>  Environment: Windows XP, JDK 1.4
>     Reporter: Neil Hyde

>
> The > character is not escaped by XMLBeans. This is not normally a problem unless it's preceeded by ]], in which case the resultant ]]> string is deemed to be markup (end of CDATA section). But what if ]]> is part of the content I'm trying to output. How can I get XMLBeans to escape the > char in this case, so that the resultant ]]&gt; string is correctly interpreted as content rather than markup when it's subsequently parsed.

-- 
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: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[jira] Commented: (XMLBEANS-183) Invalid XML generated by XMLBeans

Posted by "Neil Hyde (JIRA)" <xm...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XMLBEANS-183?page=comments#action_12317437 ] 

Neil Hyde commented on XMLBEANS-183:
------------------------------------

It seems you've attempted to fix this issue in version 2.0.0. But there is a problem in the new 2.0.0 code. In routine entitizeContent in Saver.java, the first loop which counts the number of chars that need escaping does not cater for ]]> strings. The net result is that ]]> strings don't get escaped unless the content also contains an ampersand char and/or a less than char and/or a bad char. If none of these other chars are present the routine exits at the first return before getting to the code which does the escaping. So any ]]> strings are left unchanged.

> Invalid XML generated by XMLBeans
> ---------------------------------
>
>          Key: XMLBEANS-183
>          URL: http://issues.apache.org/jira/browse/XMLBEANS-183
>      Project: XMLBeans
>         Type: Bug
>     Versions: Version 1.0.3
>  Environment: Windows XP, JDK 1.4
>     Reporter: Neil Hyde

>
> The > character is not escaped by XMLBeans. This is not normally a problem unless it's preceeded by ]], in which case the resultant ]]> string is deemed to be markup (end of CDATA section). But what if ]]> is part of the content I'm trying to output. How can I get XMLBeans to escape the > char in this case, so that the resultant ]]&gt; string is correctly interpreted as content rather than markup when it's subsequently parsed.

-- 
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: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org