Re: issue-base-param

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)

Jeremy

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