W3C home > Mailing lists > Public > public-xml-processing-model-comments@w3.org > September 2011

Re: document base uri

From: Romain Deltour <rdeltour@gmail.com>
Date: Thu, 22 Sep 2011 10:38:37 +0200
Message-Id: <E26954A1-F5FF-4A79-8FAB-FB4F4F0EA4D3@gmail.com>
To: XProc Comments <public-xml-processing-model-comments@w3.org>
Ah, Right. I hadn't thought about PIs base URIs.

A that p:base-uri step would be terrific!

I still suggest rephrasing the section 7 introduction, which is  
actually incorrect ("the base URI of the output is the base URI of the  
step's primary input document unless the step's process explicitly  
sets an xml:base attribute").

Thanks,
Romain.

Le 22 sept. 11 à 09:12, Norman Walsh a écrit :

> Romain Deltour <rdeltour@gmail.com> writes:
>> I think it would be better to say: if an attribute named "xml:base"  
>> is
>> added (or changed), the base URI of the underlying element MUST be
>> updated ; if the underlying element is the root element, the base URI
>> of the document MUST be updated.
>
> I feel your pain. But consider the following document:
>
> <?xml version="1.0">
> <?rules href="myrules.rul"?>
> <doc/>
>
> In XML, PIs have a base URI, so adding an xml:base attribute to the
> "doc" element shouldn't change the base URI of the PI. But PIs don't
> have the notion of an XML base attribute, so there's no way to
> preserve it.
>
> We could have more complex rules, saying implementations should only
> change document base URIs if there are no sibling PIs. Or saying that
> the implementation *should* preserve the base URI of the PIs (which
> might be possible, I haven't looked at the underlying XML APIs in my
> own implementation to see).
>
> That said, I stumbled over this issue occasionally too and it's
> made me consider a base URI step:
>
> <p:declare-step type="p:base-uri">
>  <p:input port="source"/>
>  <p:output port="result"/>
>  <p:option name="base-uri" required="true"/>
> </p:decare-step>
>
> This step behaves exactly like p:identity, but changes the base URI of
> the source document.
>
>                                        Be seeing you,
>                                          norm
>
> -- 
> Norman Walsh
> Lead Engineer
> MarkLogic Corporation
> Phone: +1 413 624 6676
> www.marklogic.com
Received on Thursday, 22 September 2011 08:39:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 22 September 2011 08:39:09 GMT