abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Weber <rwe...@gmail.com>
Subject Re: Problems with escaped ampersand in feed id
Date Thu, 27 Aug 2009 20:12:41 GMT
Hello Are:
My view to your problem is limited.

However, I would attempt first to decipher the default 'coding'.

Unicode-8 or Unicode-16 would, perhaps, allow a different '&amp;'
representation than the 'current' replacement that you are now experiencing.

For example, from my copy of 'Babel
Map<http://www.babelstone.co.uk/Software/BabelMap.html>',
I see a potential 'hex' replacement of '&#x0026;' and a potential 'decimal'
replacement of '&#38;'.

The 'UCN <http://www.unicode.org/versions/Unicode5.1.0/>' replacement
referring back to the 'utf-8' and 'utf-16' formats returns a replacement of
'\u0026'.

Either way you slice it, you are attempting to place a 'server' character
inside of a 'client' view.

You will need a 'method' that can toggle back to '&' prior to presenting the
valid mark-up back to the client screen.

Perhaps embedded in a returned 'CDATA' statement to isolate the machine
character(s).

The Ruby <http://rubyzero.wordpress.com> programming language has some
interesting methods of converting 'to_string', to_int', etc.

I will point there and if I see a potential solution, I will return a 'flag'
to you (and, most probably, upload the solution to the 'blog' server.

Sorry...I am not all the wizard I am made out to be.

But, I try.

Robert

On Thu, Aug 27, 2009 at 12:20 PM, Are Gulbrandsen <
a.d.gulbrandsen@usit.uio.no> wrote:

> Hi
>
> I'm implementing atom feeds for a digital library application at the
> University of Oslo using Abdera. I'm new to Abdera but up to this problem,
> Abdera has been a pleasure to work with compared to Rome.
>
> Every search in the library application will have an equivalent atom feed.
> The feed will for instance be used by a department to show the last
> submitted theses or articles.
>
> I have generated an atom feed id based on a tag uri (RFC 4151) where the
> search parameters form the last (specific) part of the URI, for instance:
> tag:duo.uio.no,2009-09:/search?language=365&yearFrom=2008&yearTo=2009
>
> The problem is that the ampersands in the id gets escaped to &amp; and the
> id becomes:
> tag:duo.uio.no
> ,2009-09:/search?language=365&amp;yearFrom=2008&amp;yearTo=2009
>
> I have fetched and checked the ID with feed.getId(), and the escaping seems
> to be happening after feed.writeTo().
>
> I have tried both feed.writeTo("prettyxml", response.getWriter()) and
> feed.writeTo(response.getWriter()).
>
> After much browsing around the Abdera Javadocs and Googling I'm still
> clueless about why Abdera would escape the characters in the ID. - Anyone
> got an idea or a tip on how to resolve this?
>
>
> Best Regards,
> Are D. Gulbrandsen
> The XML-group,
> Center for Information Technology Services
> University of Oslo
>
>


-- 
Robert Weber, MBA
PO Box 702
Scottsdale, Az USA 85252-0702

Ph: (480) 259-0646

Current project:

"hem paz" when translated into Portuguese signifies "in peace"

Xhtml Code Example(s):

<span style="font-weight:bold;">Hemp Arizona (<a href="
http://hempaz.design.officelive.com"
onclick="java_script:this.target='_blank'">USA</a>)</span>

<span style="font-weight:bold;">Clik <a href="http://
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7683956"
onclick="java_script:this.target='_blank'">here</a> to make a donation to
the Medical Marijuana Initiative (<a href="http://hempaz.com/mmi.aspx"
onclick="java_script:this.target='_blank'">MMI</a>)™</span>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message