W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > August 2007

Re: Namespace bindings

From: Jeni Tennison <jeni@jenitennison.com>
Date: Wed, 15 Aug 2007 13:41:46 +0100
Message-ID: <46C2F48A.8020207@jenitennison.com>
To: public-xml-processing-model-wg@w3.org

Alex Milowski wrote:
> On 8/9/07, Jeni Tennison <jeni@jenitennison.com> wrote:
>> The author of this pipeline can't just make the namespaces work. If the
>> pipeline was called with:
>> <x:mydelete>
>>    <p:option name="delete" value="h:div"
>>      xmlns:h="http://www.w3.org/1999/xhtml" />
>> </x:mydelete>
>> then the pipeline would fail to do what it was supposed to do.
>> Fortunately it would give an error because of the unbound prefix, so I
>> guess this isn't as dreadful as it could be, but it's still impossible
>> to work around, and it makes pipelines that take options that are XPaths
>> or QNames unviable.
> The core of the idea is that every option value has a set of in-scope namespaces
> associated with it.  By default, the in-scope namespaces are those of the
> p:option element where the value was set.


> For the above example:
> <x:mydelete>
> <p:option name="delete" value="h:div" xmlns:h="http://www.w3.org/1999/xhtml"/>
> </x:mydelete>
> that's going to work fine because the 'h' prefix is exactly what the
> author thinks
> it should be.

Err, no. Because the x:mydelete pipeline looks like:

<p:pipeline xmlns:p="..." xmlns:x="..."
   <p:option name="delete" required="yes" />

     <p:input port="source">
         <html xmlns="http://www.w3.org/1999/xhtml">
           <h1>Delete My Divs</h1>

     <p:option name="match" select="$delete"

The $delete option in x:mydelete gets set to "h:div" including the 
namespace binding {"h": "http://www.w3.org/1999/xhtml"}, fine. But when 
the $match option in p:delete gets set, it's set to "h:div" with the 
namespace binding {"html": "http://www.w3.org/1999/xhtml"}. There's no 
binding for the "h" prefix, so the step fails.

I don't see how your proposal handles this example (option value bound 
to option value), and I think think is going to be the most common case.


Jeni Tennison
Received on Wednesday, 15 August 2007 12:42:12 UTC

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