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

Re: Namespace bindings

From: Innovimax SARL <innovimax@gmail.com>
Date: Tue, 7 Aug 2007 00:57:32 +0200
Message-ID: <546c6c1c0708061557k7ad5ddcayac26ca4e78f409c5@mail.gmail.com>
To: "Norman Walsh" <ndw@nwalsh.com>
Cc: public-xml-processing-model-wg@w3.org

On 8/6/07, Norman Walsh <ndw@nwalsh.com> wrote:
> Do we expect the following pipeline to work?
>
> <p:pipeline xmlns:p="...">
>   <p:option name="delete" value="html:div"
>             xmlns:html="http://www.w3.org/1999/xhtml"/>

Here there is no need to declare html since value is just a string

>
>   <p:delete>
>     <p:input port="source">
>       <p:inline>
>         <html xmlns="http://www.w3.org/1999/xhtml">
>         <head>...</head>
>         <body>
>           <h1>Delete My Divs</h1>
>           <div>
>             ...
>           </div>
>         </body>
>       </p:inline>
>     </p:input>
>
>     <p:option name="match" select="$delete"/>

Here the inscope namespace do not contains html so it is a error
--> I have only one problem : WHICH ERROR ?

>   </p:delete>
> </p:pipeline>
>
> Where "work" means that the pipeline runs and produces:
>
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>...</head>
> <body>
>   <h1>Delete My Divs</h1>
> </body>

No (see above)


>
> Suppose local.xml contains:
>
>   <commands>
>     <delete xmlns:h="http://www.w3.org/1999/xhtml"
>             match="h:div"/>
>   </commands>
>
> Do we expect this to work?
>
> <p:pipeline xmlns:p="...">
>   <p:load name="load-commands" href="local.xml"/>
>
>   <p:delete>
>     <p:input port="source">
>       <p:inline>
>         <html xmlns="http://www.w3.org/1999/xhtml">
>         <head>...</head>
>         <body>
>           <h1>Delete My Divs</h1>
>           <div>
>             ...
>           </div>
>         </body>
>       </p:inline>
>     </p:input>
>
>     <p:option name="match" select="/commands/delete/@match">
>       <p:pipe step="load-commands" port="result"/>
>     </p:option>
>   </p:delete>
> </p:pipeline>

This one is trickier : it depends if we adopt the strategy to augment
the available namespaces with the one in the context of the XPath
expression

If not, then it is the same (unknown) error as above

Mohamed


-- 
Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 9 52 475787
Fax : +33 1 4356 1746
http://www.innovimax.fr
RCS Paris 488.018.631
SARL au capital de 10.000 
Received on Monday, 6 August 2007 22:57:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:53 GMT