[xquery-talk] Re: zero-length string namespaces URI

Michael Kay mhk at mhk.me.uk
Thu Sep 29 10:25:38 PDT 2005


 
> >>
> >>declare namespace local="";
> >>declare function local:depth($e as node()) as xs:integer
> 
> What it is supposed to raise now ?

It will report that there is no binding for the namespace prefix "local".
> 
> Another question since we are proceeding :
> 
> Could every "built-in" namespace be undeclared ? I mean those in :
> 
> >       xml = http://www.w3.org/XML/1998/namespace
> >       xs = http://www.w3.org/2001/XMLSchema
> >       xsi = http://www.w3.org/2001/XMLSchema-instance
> >       fn = http://www.w3.org/2005/xpath-functions
> >       xdt = http://www.w3.org/2005/xpath-datatypes
> >       local = http://www.w3.org/2005/xquery-local-functions 
> (see 4.15 Function Declaration.)
> 
> What would be the sense of undeclaring the xml NS forexample ?

There's an explicit ban on redeclaring the xml namespace. The others can all
be undeclared or redeclared.

Michael Kay
http://www.saxonica.com/




More information about the talk mailing list