Subject: RE: [Simple] Namespaces and XCAP

From: "Nelson Hung" <[email-masked]>
Date: Tue, 1 Feb 2005 11:10:33 -0800

Inline 

> -----Original Message-----
> From: Jonathan Rosenberg [mailto:[email-masked]]
> Sent: Monday, January 31, 2005 5:29 PM
> To: Nelson Hung
> Cc: 'Simple WG'
> Subject: Re: [Simple] Namespaces and XCAP
>
> This particular behavior in XPath 1.0 is IMHO a bug, and appears to 
> have been corrected in XPath 2.0.

I believe that this behavior is intentional in XPath 1.0. 

I cannot speak for the member of XPath 1.0 working group but I guess the
reason behind this behavior is that they dislike the fact that elements and
attributes are not being treated uniformly => default namespace only apply
to elements but not to attributes.

> We are not normatively dependent on XPath, so we can do what we choose. 
> I would propose that the application usage specify the default 
> namespace. Otherwise, every single XCAP URI will need to contain a
> xmlns() xpointer expression declaring the default namespace for the 
> documents, all of which are likely to use the target namespace as the 
> default.
>
> If we specify this, an xcap expression would be compatible with xpath 
> 2.0 I believe.

XPath 2.0 does allow the host language to provide a default element/type
namespace

http://www.w3.org/TR/2004/WD-xpath20-20041029/#static_context

[Definition: Default element/type namespace. This is a namespace URI or
"none". The namespace URI, if present, is used for any unprefixed QName
appearing in a position where an element or type name is expected.] The
initial default element/type namespace may be provided by the host language.

>
> -Jonathan R.
>
> Nelson Hung wrote:
>
> > I agree that 5(A) is the best option.
> > 
> > But one thing about default namespace, XPath Specification 1.0 
> > explicitly disallows the use of default namespace in an XPath
expression...
> > 
> > 
> > http://www.w3.org/TR/xpath#node-tests
> > 
> > 
> > "A QName in the node test is expanded into an expanded-name using 
> > the namespace declarations from the expression context. This is the 
> > same way expansion is done for element type names in start and 
> > end-tags except that the default namespace declared with xmlns is 
> > not used: if the QName does not have a prefix, then the namespace 
> > URI is null (this is the same way attribute names are expanded). It 
> > is an error if the QName has a prefix for which there is no namespace
declaration in the expression context."

_______________________________________________
Simple mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/simple

---

From: Jonathan Rosenberg <[email-masked]>
Date: Tue, 01 Feb 2005 16:55:50 -0500

inline.

> to elements but not to attributes.

Sure, but thats a complaint in the way XML namespaces is done. In any 
cases, it doesn't matter.

> initial default element/type namespace may be provided by the host language.

Right. So, my point is that we can choose if we want to specify the 
default namespace, or if the default namespace should be null as per 
Xpath 1.0. I see no benefit to the default being null, as this would 
require a namespace declaration for the default namespace for even the 
simplest document. As such, I would still propose that we specify in 
xcap that the application usage defines the default namespace.

-Jonathan R.
-- 
Jonathan D. Rosenberg, Ph.D.                   600 Lanidex Plaza
Director, Service Provider VoIP Architecture   Parsippany, NJ 07054-2711
Cisco Systems
[email-masked]                              FAX:   (973) 952-5050
http://www.jdrosen.net                         PHONE: (973) 952-5000
http://www.cisco.com