You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@abdera.apache.org by Udomsak Donkhampai <UD...@vizrt.com> on 2009/11/13 05:25:56 UTC

Help:Atom:Link

I try to reader Atom and I  found error when in Atom has  '&' in the link



Example: <link  href="http://news.google.com/news?ned=us&topic=h&output=atom" rel="self" ></link>

This error: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '=' (code 61); expected a semi-colon after the reference for entity 'topic'



And I read  in http://www.ietf.org/rfc/rfc4287.txt



4.2.7.1.  The "href" Attribute



   The "href" attribute contains the link's IRI. atom:link elements MUST

   have an href attribute, whose value MUST be a IRI reference

   [RFC3987].



And IRI (http://www.ietf.org/rfc/rfc3987.txt)


   IRI            = scheme ":" ihier-part [ "?" iquery ]
                         [ "#" ifragment ]



IRI allow to have  '&' after '?' iquery





Do you have any idea for this problem?





Thank.



Aom







Re: Help:Atom:Link

Posted by Ugo Cei <u....@sourcesense.com>.
On Nov 13, 2009, at 5:25 AM, Udomsak Donkhampai wrote:

> I try to reader Atom and I  found error when in Atom has  '&' in the  
> link
>
>
>
> Example: <link  href="http://news.google.com/news?ned=us&topic=h&output=atom 
> " rel="self" ></link>


The '&'  character cannot be used non-escaped in an XML document and  
an Atom feed is an XML document. Actually, the feed that can be found  
at that URL has all occurrences of '&' correctly escaped as '&amp;' as  
it should be.

	Ugo

-- 
Ugo Cei
Sourcesense - making sense of Open Source: http://www.sourcesense.com


Re: Help:Atom:Link

Posted by Jim Ancona <ji...@anconafamily.com>.
On Thu, Nov 12, 2009 at 11:25 PM, Udomsak Donkhampai
<UD...@vizrt.com> wrote:
> I try to reader Atom and I  found error when in Atom has  '&' in the link

Atom documents must be well-formed XML, so the '&' must be encoded as '&amp;'.

Jim

>
>
>
> Example: <link  href="http://news.google.com/news?ned=us&topic=h&output=atom" rel="self" ></link>
>
> This error: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '=' (code 61); expected a semi-colon after the reference for entity 'topic'
>
>
>
> And I read  in http://www.ietf.org/rfc/rfc4287.txt
>
>
>
> 4.2.7.1.  The "href" Attribute
>
>
>
>   The "href" attribute contains the link's IRI. atom:link elements MUST
>
>   have an href attribute, whose value MUST be a IRI reference
>
>   [RFC3987].
>
>
>
> And IRI (http://www.ietf.org/rfc/rfc3987.txt)
>
>
>   IRI            = scheme ":" ihier-part [ "?" iquery ]
>                         [ "#" ifragment ]
>
>
>
> IRI allow to have  '&' after '?' iquery
>
>
>
>
>
> Do you have any idea for this problem?
>
>
>
>
>
> Thank.
>
>
>
> Aom
>
>
>
>
>
>
>