You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ws.apache.org by Ajit Bhingarkar <ab...@tibco.com> on 2011/09/02 07:28:36 UTC

AXIOM 1.2.8: Issue with character ">"

Hi,

We are seeing that when an OMElement is created from a String based XML fragment; &gt; are decided back to ">" while &lt; in the fragment remain.

This is causing inconsistency; we would like either &gt; to remain or also &lt; to get decoded as "<".

Can you pls share any solution or a workaround? A similar issue is mentioned at http://wso2.org/mailarchive/esb-java-user/2008-August/000728.html.

Source -> BoB2&lt;sup&gt;TM&lt;/sup&gt;
Result -> BoB2&lt;sup>TM&lt;/sup>

Thanks,
Ajit


RE: AXIOM 1.2.8: Issue with character ">"

Posted by Ajit Bhingarkar <ab...@tibco.com>.
Just for consistency in the response I guess. 

Anyway I tried replacing the STaX with SAX and it seems to offer me the consistency I wanted. Raw XMLs are as below.

AXIOM with SAX:

<Attribute name="Dummy" type="string">BoB2&lt;sup&gt;TM&lt;/sup&gt; is the next generation of wireless modems from iiNet.Here.s why you.ll love him&lt;br /&gt; &lt;ul&gt; &lt;li&gt;Delivers super fast broadband.</Attribute>

AXIOM with STaX:

<Attribute name="Dummy" type="string">BoB2&lt;sup>TM&lt;/sup> is the next generation of wireless modems from iiNet.Here.s why you.ll love him&lt;br /> &lt;ul> &lt;li>Delivers super fast broadband.</Attribute>

Regards,
Ajit

-----Original Message-----
From: Andreas Veithen [mailto:andreas.veithen@gmail.com] 
Sent: 04 September 2011 16:01
To: users@ws.apache.org
Subject: Re: AXIOM 1.2.8: Issue with character ">"

Why would you want to do that?

Andreas

On Fri, Sep 2, 2011 at 21:07, Ajit Bhingarkar <ab...@tibco.com> wrote:
> Ok. Then is there a way to stop my &gt; to get decoded back to ">"?
>
> -----Original Message-----
> From: Andreas Veithen [mailto:andreas.veithen@gmail.com]
> Sent: 03 September 2011 00:33
> To: users@ws.apache.org
> Subject: Re: AXIOM 1.2.8: Issue with character ">"
>
> On Fri, Sep 2, 2011 at 20:38, Ajit Bhingarkar <ab...@tibco.com> wrote:
>> Thanks Andreas.
>>
>> In my src string "<" and ">" are correctly encoded as "&lt;" and "&gt;" respectively. When I create an OMElement out of this input string "&lt;" remain as they are while "&gt;" get decoded back to ">".
>>
>> What I meant by inconsistency is that either both "&lt;" and "&gt;" should get decoded to "<" and ">" respectively or "&gt;" should not get decoded back to ">".
>
> Why? Inside element content in a document entity, "&lt;" and "<" have
> two different meanings, while "&gt;" and ">" are equivalent and
> interchangeable.
>
>> Regards,
>> Ajit
>>
>> -----Original Message-----
>> From: Andreas Veithen [mailto:andreas.veithen@gmail.com]
>> Sent: 02 September 2011 23:55
>> To: users@ws.apache.org
>> Subject: Re: AXIOM 1.2.8: Issue with character ">"
>>
>> How is this causing inconsistency?
>>
>> Andreas
>>
>> On Fri, Sep 2, 2011 at 07:28, Ajit Bhingarkar <ab...@tibco.com> wrote:
>>> Hi,
>>>
>>>
>>>
>>> We are seeing that when an OMElement is created from a String based XML
>>> fragment; &gt; are decided back to ">" while &lt; in the fragment remain.
>>>
>>>
>>>
>>> This is causing inconsistency; we would like either &gt; to remain or also
>>> &lt; to get decoded as "<".
>>>
>>>
>>>
>>> Can you pls share any solution or a workaround? A similar issue is mentioned
>>> at http://wso2.org/mailarchive/esb-java-user/2008-August/000728.html.
>>>
>>>
>>>
>>> Source -> BoB2&lt;sup&gt;TM&lt;/sup&gt;
>>>
>>> Result -> BoB2&lt;sup>TM&lt;/sup>
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Ajit
>>>
>>>
>>
>

Re: AXIOM 1.2.8: Issue with character ">"

Posted by Andreas Veithen <an...@gmail.com>.
Why would you want to do that?

Andreas

On Fri, Sep 2, 2011 at 21:07, Ajit Bhingarkar <ab...@tibco.com> wrote:
> Ok. Then is there a way to stop my &gt; to get decoded back to ">"?
>
> -----Original Message-----
> From: Andreas Veithen [mailto:andreas.veithen@gmail.com]
> Sent: 03 September 2011 00:33
> To: users@ws.apache.org
> Subject: Re: AXIOM 1.2.8: Issue with character ">"
>
> On Fri, Sep 2, 2011 at 20:38, Ajit Bhingarkar <ab...@tibco.com> wrote:
>> Thanks Andreas.
>>
>> In my src string "<" and ">" are correctly encoded as "&lt;" and "&gt;" respectively. When I create an OMElement out of this input string "&lt;" remain as they are while "&gt;" get decoded back to ">".
>>
>> What I meant by inconsistency is that either both "&lt;" and "&gt;" should get decoded to "<" and ">" respectively or "&gt;" should not get decoded back to ">".
>
> Why? Inside element content in a document entity, "&lt;" and "<" have
> two different meanings, while "&gt;" and ">" are equivalent and
> interchangeable.
>
>> Regards,
>> Ajit
>>
>> -----Original Message-----
>> From: Andreas Veithen [mailto:andreas.veithen@gmail.com]
>> Sent: 02 September 2011 23:55
>> To: users@ws.apache.org
>> Subject: Re: AXIOM 1.2.8: Issue with character ">"
>>
>> How is this causing inconsistency?
>>
>> Andreas
>>
>> On Fri, Sep 2, 2011 at 07:28, Ajit Bhingarkar <ab...@tibco.com> wrote:
>>> Hi,
>>>
>>>
>>>
>>> We are seeing that when an OMElement is created from a String based XML
>>> fragment; &gt; are decided back to ">" while &lt; in the fragment remain.
>>>
>>>
>>>
>>> This is causing inconsistency; we would like either &gt; to remain or also
>>> &lt; to get decoded as "<".
>>>
>>>
>>>
>>> Can you pls share any solution or a workaround? A similar issue is mentioned
>>> at http://wso2.org/mailarchive/esb-java-user/2008-August/000728.html.
>>>
>>>
>>>
>>> Source -> BoB2&lt;sup&gt;TM&lt;/sup&gt;
>>>
>>> Result -> BoB2&lt;sup>TM&lt;/sup>
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Ajit
>>>
>>>
>>
>

RE: AXIOM 1.2.8: Issue with character ">"

Posted by Ajit Bhingarkar <ab...@tibco.com>.
Ok. Then is there a way to stop my &gt; to get decoded back to ">"?

-----Original Message-----
From: Andreas Veithen [mailto:andreas.veithen@gmail.com] 
Sent: 03 September 2011 00:33
To: users@ws.apache.org
Subject: Re: AXIOM 1.2.8: Issue with character ">"

On Fri, Sep 2, 2011 at 20:38, Ajit Bhingarkar <ab...@tibco.com> wrote:
> Thanks Andreas.
>
> In my src string "<" and ">" are correctly encoded as "&lt;" and "&gt;" respectively. When I create an OMElement out of this input string "&lt;" remain as they are while "&gt;" get decoded back to ">".
>
> What I meant by inconsistency is that either both "&lt;" and "&gt;" should get decoded to "<" and ">" respectively or "&gt;" should not get decoded back to ">".

Why? Inside element content in a document entity, "&lt;" and "<" have
two different meanings, while "&gt;" and ">" are equivalent and
interchangeable.

> Regards,
> Ajit
>
> -----Original Message-----
> From: Andreas Veithen [mailto:andreas.veithen@gmail.com]
> Sent: 02 September 2011 23:55
> To: users@ws.apache.org
> Subject: Re: AXIOM 1.2.8: Issue with character ">"
>
> How is this causing inconsistency?
>
> Andreas
>
> On Fri, Sep 2, 2011 at 07:28, Ajit Bhingarkar <ab...@tibco.com> wrote:
>> Hi,
>>
>>
>>
>> We are seeing that when an OMElement is created from a String based XML
>> fragment; &gt; are decided back to ">" while &lt; in the fragment remain.
>>
>>
>>
>> This is causing inconsistency; we would like either &gt; to remain or also
>> &lt; to get decoded as "<".
>>
>>
>>
>> Can you pls share any solution or a workaround? A similar issue is mentioned
>> at http://wso2.org/mailarchive/esb-java-user/2008-August/000728.html.
>>
>>
>>
>> Source -> BoB2&lt;sup&gt;TM&lt;/sup&gt;
>>
>> Result -> BoB2&lt;sup>TM&lt;/sup>
>>
>>
>>
>> Thanks,
>>
>> Ajit
>>
>>
>

Re: AXIOM 1.2.8: Issue with character ">"

Posted by Andreas Veithen <an...@gmail.com>.
On Fri, Sep 2, 2011 at 20:38, Ajit Bhingarkar <ab...@tibco.com> wrote:
> Thanks Andreas.
>
> In my src string "<" and ">" are correctly encoded as "&lt;" and "&gt;" respectively. When I create an OMElement out of this input string "&lt;" remain as they are while "&gt;" get decoded back to ">".
>
> What I meant by inconsistency is that either both "&lt;" and "&gt;" should get decoded to "<" and ">" respectively or "&gt;" should not get decoded back to ">".

Why? Inside element content in a document entity, "&lt;" and "<" have
two different meanings, while "&gt;" and ">" are equivalent and
interchangeable.

> Regards,
> Ajit
>
> -----Original Message-----
> From: Andreas Veithen [mailto:andreas.veithen@gmail.com]
> Sent: 02 September 2011 23:55
> To: users@ws.apache.org
> Subject: Re: AXIOM 1.2.8: Issue with character ">"
>
> How is this causing inconsistency?
>
> Andreas
>
> On Fri, Sep 2, 2011 at 07:28, Ajit Bhingarkar <ab...@tibco.com> wrote:
>> Hi,
>>
>>
>>
>> We are seeing that when an OMElement is created from a String based XML
>> fragment; &gt; are decided back to ">" while &lt; in the fragment remain.
>>
>>
>>
>> This is causing inconsistency; we would like either &gt; to remain or also
>> &lt; to get decoded as "<".
>>
>>
>>
>> Can you pls share any solution or a workaround? A similar issue is mentioned
>> at http://wso2.org/mailarchive/esb-java-user/2008-August/000728.html.
>>
>>
>>
>> Source -> BoB2&lt;sup&gt;TM&lt;/sup&gt;
>>
>> Result -> BoB2&lt;sup>TM&lt;/sup>
>>
>>
>>
>> Thanks,
>>
>> Ajit
>>
>>
>

RE: AXIOM 1.2.8: Issue with character ">"

Posted by Ajit Bhingarkar <ab...@tibco.com>.
Thanks Andreas.

In my src string "<" and ">" are correctly encoded as "&lt;" and "&gt;" respectively. When I create an OMElement out of this input string "&lt;" remain as they are while "&gt;" get decoded back to ">".

What I meant by inconsistency is that either both "&lt;" and "&gt;" should get decoded to "<" and ">" respectively or "&gt;" should not get decoded back to ">".

Regards,
Ajit

-----Original Message-----
From: Andreas Veithen [mailto:andreas.veithen@gmail.com] 
Sent: 02 September 2011 23:55
To: users@ws.apache.org
Subject: Re: AXIOM 1.2.8: Issue with character ">"

How is this causing inconsistency?

Andreas

On Fri, Sep 2, 2011 at 07:28, Ajit Bhingarkar <ab...@tibco.com> wrote:
> Hi,
>
>
>
> We are seeing that when an OMElement is created from a String based XML
> fragment; &gt; are decided back to ">" while &lt; in the fragment remain.
>
>
>
> This is causing inconsistency; we would like either &gt; to remain or also
> &lt; to get decoded as "<".
>
>
>
> Can you pls share any solution or a workaround? A similar issue is mentioned
> at http://wso2.org/mailarchive/esb-java-user/2008-August/000728.html.
>
>
>
> Source -> BoB2&lt;sup&gt;TM&lt;/sup&gt;
>
> Result -> BoB2&lt;sup>TM&lt;/sup>
>
>
>
> Thanks,
>
> Ajit
>
>

Re: AXIOM 1.2.8: Issue with character ">"

Posted by Andreas Veithen <an...@gmail.com>.
How is this causing inconsistency?

Andreas

On Fri, Sep 2, 2011 at 07:28, Ajit Bhingarkar <ab...@tibco.com> wrote:
> Hi,
>
>
>
> We are seeing that when an OMElement is created from a String based XML
> fragment; &gt; are decided back to “>” while &lt; in the fragment remain.
>
>
>
> This is causing inconsistency; we would like either &gt; to remain or also
> &lt; to get decoded as “<”.
>
>
>
> Can you pls share any solution or a workaround? A similar issue is mentioned
> at http://wso2.org/mailarchive/esb-java-user/2008-August/000728.html.
>
>
>
> Source -> BoB2&lt;sup&gt;TM&lt;/sup&gt;
>
> Result -> BoB2&lt;sup>TM&lt;/sup>
>
>
>
> Thanks,
>
> Ajit
>
>