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 Mon, 31 Aug 2009 18:11:44 GMT
Thank you for the update Are...i will mark your ticket as solved.

Robert

On Fri, Aug 28, 2009 at 3:47 AM, Are Gulbrandsen <
a.d.gulbrandsen@usit.uio.no> wrote:

> Hi again
>
> Thanks for the suggestions.
>
> I found a simple solution to this.
>
> As a reference I'll rephrase the challenge:
>
> - I want to make any search in my application have a corresponding Atom
> feed
> - The application uses query parameters: ?param1=value1&param2=value2...
> - The feed ID should be the same for any searches wich are equivalent.
>  parameter permutations can give several equivalent searches:
>  ?param1=value1&param2=value2
>  ?param2=value2&param1=value1
> - I want to mint an Atom feed ID using the Tag URI scheme
> - The feed ID should be easy for humans to read
>
> I first looked at the Tag URI scheme, and found how to mint the ID.
> Ref http://taguri.org/
> tagURI = "tag:" taggingEntity ":" specific
>
> The first parts were easy:
> tag:duo.uio.no,2009-09:
>
> The specific part was the challenge.
>
> The Atom specification was not a great help:
> http://tools.ietf.org/html/rfc4287#section-4.2.6
>
> I first decided on using a normal query syntax:
> search?param1=value1&param2=value2
>
> The problem is that the ampersands are escaped to make the ID-string valid
> XML content, which makes an ugly, long and difficult to read ID (a search
> can typically have 6 parameters).
>
> The sollution was in http://en.wikipedia.org/wiki/URI_scheme
> where semicolon is suggested as a parameter delimiter in the query, exactly
> to avoid the problem with &amp; in the query string.
>
> (I now know that this was suggestes by Tim Berners-Lee as early as in 1995
> in Hypertext Markup Language - 2.0, ref http://tools.ietf.org/html/rfc1866 section
> 8.2.1)
>
> We'll use the following feed ID scheme:
> tag:duo.uio.no,2009-09:search?param1=value1;param2=value2
>
> To make sure that equivalent searches have the same feed-ID, I remove any
> unnecessary parameters (like format=atom) and sort the parameters before
> minting the feed ID.
>
>
>
> 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