You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "horatiu.cherebetiu" <ho...@yahoo.com> on 2009/06/09 11:26:27 UTC

Re: [jira] Resolved: (XMLBEANS-281) org.apache.xmlbeans.impl.tool.PrettyPrinter does not honour >

So if I want to have in the output xml file the character ">" or "<" or "&"
not escaped and not in a CDATA tag, is not possible ? 

Regards, 
Horatiu



JIRA xmlbeans-dev@xml.apache.org wrote:
> 
> 
>      [
> https://issues.apache.org/jira/browse/XMLBEANS-281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> ]
> 
> Radu Preotiuc-Pietro resolved XMLBEANS-281.
> -------------------------------------------
> 
>        Resolution: Won't Fix
>     Fix Version/s:  Version 2.3
> 
> In the case of '>' and '&gt;', it goes even beyond pretty-print, because
> from an XML point of view, they are exactly equivalent, so they are not
> preserved regardless.
> 
> XMLBeans 2.3.0 has introduced the XmlOptions.setSaveSubstituteCharacters()
> method, which allows you to specify what characters you want escaped,
> maybe this will help. But the setting is document-wide, so if you want to
> sometimes output '>' and sometimes '&lt;', you are out of luck.
> 
> 
>> org.apache.xmlbeans.impl.tool.PrettyPrinter does not honour &gt;
>> ----------------------------------------------------------------
>>
>>                 Key: XMLBEANS-281
>>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-281
>>             Project: XMLBeans
>>          Issue Type: Bug
>>          Components: Tools
>>    Affects Versions: Version 2.2
>>         Environment: Windows XP, Intel P4, (I don't think this should
>> matter)
>>            Reporter: Ragunath Ramaswamy
>>             Fix For:  Version 2.3
>>
>>
>> I have an xml as
>> <Property name="Test">
>>     <Value>less than is &lt; greaterthan is &gt;</Value>
>> </Property>
>> when I use this as an input to the xpretty command line tool to give the
>> pretty printed output I get the result as
>> <Property name="Test">
>>     <Value>less than is &lt; greaterthan is ></Value>
>> </Property>
>> I find that the xml escape characters for > are posing an issue here.
> 
> -- 
> 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: dev-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: dev-help@xmlbeans.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-jira--Created%3A-%28XMLBEANS-281%29-org.apache.xmlbeans.impl.tool.PrettyPrinter-does-not-honour--gt--tp5623982p23939395.html
Sent from the Xml Beans - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


RE: [jira] Resolved: (XMLBEANS-281) org.apache.xmlbeans.impl.tool.PrettyPrinter does not honour >

Posted by Wing Yew Poon <wi...@oracle.com>.
Horatiu,
this is not even an XMLBeans question, this is simply an XML question.
In XML, the character data inside an element must not contain a raw
unescaped open angle bracket (<); this character is always interpreted
as the start of a tag. If you need to use this character, you can
escape it using the built-in entity reference &lt; (or the numeric or
hexadecimal numeric character references). Character data may not contain
a raw unescaped ampersand (&) either. Character data _may_ contain the
raw unescaped closed angle bracket (>).
- Wing Yew

-----Original Message-----
From: horatiu.cherebetiu [mailto:hory191@yahoo.com] 
Sent: Tuesday, June 09, 2009 2:26 AM
To: dev@xmlbeans.apache.org
Subject: Re: [jira] Resolved: (XMLBEANS-281) org.apache.xmlbeans.impl.tool.PrettyPrinter does not honour &gt;


So if I want to have in the output xml file the character ">" or "<" or "&"
not escaped and not in a CDATA tag, is not possible ? 

Regards, 
Horatiu



JIRA xmlbeans-dev@xml.apache.org wrote:
> 
> 
>      [
> https://issues.apache.org/jira/browse/XMLBEANS-281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> ]
> 
> Radu Preotiuc-Pietro resolved XMLBEANS-281.
> -------------------------------------------
> 
>        Resolution: Won't Fix
>     Fix Version/s:  Version 2.3
> 
> In the case of '>' and '&gt;', it goes even beyond pretty-print, because
> from an XML point of view, they are exactly equivalent, so they are not
> preserved regardless.
> 
> XMLBeans 2.3.0 has introduced the XmlOptions.setSaveSubstituteCharacters()
> method, which allows you to specify what characters you want escaped,
> maybe this will help. But the setting is document-wide, so if you want to
> sometimes output '>' and sometimes '&lt;', you are out of luck.
> 
> 
>> org.apache.xmlbeans.impl.tool.PrettyPrinter does not honour &gt;
>> ----------------------------------------------------------------
>>
>>                 Key: XMLBEANS-281
>>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-281
>>             Project: XMLBeans
>>          Issue Type: Bug
>>          Components: Tools
>>    Affects Versions: Version 2.2
>>         Environment: Windows XP, Intel P4, (I don't think this should
>> matter)
>>            Reporter: Ragunath Ramaswamy
>>             Fix For:  Version 2.3
>>
>>
>> I have an xml as
>> <Property name="Test">
>>     <Value>less than is &lt; greaterthan is &gt;</Value>
>> </Property>
>> when I use this as an input to the xpretty command line tool to give the
>> pretty printed output I get the result as
>> <Property name="Test">
>>     <Value>less than is &lt; greaterthan is ></Value>
>> </Property>
>> I find that the xml escape characters for > are posing an issue here.
> 
> -- 
> 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: dev-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: dev-help@xmlbeans.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-jira--Created%3A-%28XMLBEANS-281%29-org.apache.xmlbeans.impl.tool.PrettyPrinter-does-not-honour--gt--tp5623982p23939395.html
Sent from the Xml Beans - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org