W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > April 2007

Re: issue-base-param

From: Jeremy Carroll <jjc@hpl.hp.com>
Date: Tue, 17 Apr 2007 17:53:52 +0100
Message-ID: <4624FBA0.70609@hpl.hp.com>
To: Fabien Gandon <Fabien.Gandon@sophia.inria.fr>
CC: public-rdf-in-xhtml-tf@w3.org

I think a good XSLT 1.0 style sheet could possibly do the following

Access the self-or-ancestor axis xml:base attribute, if any.
If there is one and it does not start with a scheme i.e. a regex 
something like ^[-a-zA-Z.]+:   (can you do that in XSLT 1.0) then print 
error message and exit

otherwise, copy that absolute URI to output, or do nothing (the base URI 
of the output is the base URI of the input - as in GRDDL)


For html the case is different.

If there is an html/head/base element use that (probably trimmed for 
leading and trailing whitespace); and if there is an XML base in scope, 
it is an error if it does not agree with the html base

Otherwise, an xml:base inside an HTML document is an error (it is 
invalid, and may lead to non-interoperable behaviour)


Fabien Gandon wrote:
> Thank you for this clear answer.
> Jeremy Carroll:
>> <a xml:base="http://example.org/">
>>   <b xml:base="b/">
>>   <a xml:base="a/">
>>   <a xml:base="a/">
>>   <b xml:base="b/">
>>    <a href="foo"/>
>>   </b>
>>   </a>
>>   </a>
>>   </b>
>> </a>
>> If the foo is a relative reference then I think it is
>> http://example.org/b/a/a/b/foo
> Indeed this would make my stylesheet crash.
> sob.
> Thanks,

Hewlett-Packard Limited
registered Office: Cain Road, Bracknell, Berks RG12 1HN
Registered No: 690597 England
Received on Tuesday, 17 April 2007 16:54:06 UTC

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