Re: is it possible to handle an XML/HTML elements attribute via the URI?

On Thu, Oct 28, 2010 at 3:21 AM, Matthew Millar <mattmill30@hotmail.com> wrote:
> Hi,
>
> I'm wondering whether its possible to handle a page element, via the URI?
>
> I'd like to handle an elements attribute, based on its ID.
>
> Like an expansion of the #ID URI feature.
>
> I'm hoping for something like:
>
> http://domain/page.html#ID[dir]="ltr"
>
> In the example above, i would want to add the "dir" attribute, with a value
> of "ltr", to the element whose id is "ID"
>
> If its not currently possible, could it be considered for a future standard,
> or an extension to the current URI standard.
>
> Thanks,
>
> Matthew Millar
>


I'm thinking about a similar thing for media fragment URIs[1] where it
would be nice to be able to say in the URI which video on the page
should be displayed from what time offset or what chapter. Something
like:

http://example.com/page.html#video[0]&t=50
http://example.com/page.html#video[1]&id=chapter-3

XPointer[2] allows for such addressing as you are proposing on xml
documents, e.g. http://domain/page.html#xpointer(id('xyz')) . However,
it doesn't provide means to change the value of attributes - and I am
not sure that should be the aim of standard URIs. It would be
something that you'd need to do in your application, so use a query
parameter instead, e.g. http://domain/page.html?ID[dir]="ltr", and
process it in your server app.

Cheers,
Silvia.


[1] http://www.w3.org/TR/media-frags/
[2] http://www.w3.org/TR/xptr-framework/

Received on Wednesday, 27 October 2010 21:13:52 UTC