W3C home > Mailing lists > Public > public-vocabs@w3.org > October 2011

Re: Canonicalizing relative URLs seen in URL type properties?

From: Philip Jägenstedt <philipj@opera.com>
Date: Thu, 20 Oct 2011 10:26:36 +0200
To: public-vocabs@w3.org
Message-ID: <op.v3m5qmh6sr6mfa@kirk>
On Thu, 20 Oct 2011 02:10:12 +0200, John Panzer <jpanzer@google.com> wrote:

> What are the rules for canonicalizing URLs seen in URL valued  
> properties?  I
> would guess that whether or not a value appears in an HTML URL attribute  
> or
> is encoded some other way with microdata, the rules should be the same.
>  Which implies paying attention to <base> tags etc.  Is this correct?

This is defined in  

"The value is the absolute URL that results from resolving the value of  
the element's src/href attribute relative to the element at the time the  
attribute is set, or the empty string if there is no such attribute or if  
resolving it results in an error."

Following the references, you'll find that you need to resolve the URL by  
(basically) parsing it and then putting it back together while taking  
<base> into account.

Philip Jägenstedt
Core Developer
Opera Software
Received on Thursday, 20 October 2011 08:27:06 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:29:21 UTC