W3C home > Mailing lists > Public > www-ws-desc@w3.org > February 2007

RE: References in the default namespace

From: Jonathan Marsh <jonathan@wso2.com>
Date: Fri, 9 Feb 2007 16:13:44 -0800
To: "'Arthur Ryman'" <ryman@ca.ibm.com>, "'Jacek Kopecky'" <jacek.kopecky@deri.org>
Cc: <www-ws-desc@w3.org>
Message-ID: <019001c74ca8$556b98c0$3501a8c0@DELLICIOUS>
I don't see a problem in referring to non-namespaced elements.  Such
elements have an expanded name with a null namespace uri value.


We already have a QName resolution section that takes as input a namespace,
and tells how to identify the corresponding component.


What I think may be missing is some text that says "Take the value of the
attribute intended to be used as a QName reference.  If it has a prefix,
look up the corresponding namespace declaration to determine the namespace
uri.  If there is no prefix, use the default namespace uri.  If there is no
default namespace uri, use the null uri."  I don't see anything that clearly
stated in the XML Schema or Namespaces specs, although that is I suppose how
one would expect it to work.  (Though the order in which to choose the
default namespace or the null namespace may be different in different
contexts, e.g. element reference tokens in xpath and xml local attributes
vs. xml element names.)


Jonathan Marsh -  <http://www.wso2.com> http://www.wso2.com -
<http://auburnmarshes.spaces.live.com> http://auburnmarshes.spaces.live.com



From: Arthur Ryman [mailto:ryman@ca.ibm.com] 
Sent: Friday, February 09, 2007 4:28 AM
To: Jacek Kopecky
Cc: Jonathan Marsh; www-ws-desc@w3.org; www-ws-desc-request@w3.org
Subject: Re: References in the default namespace



In the XML:  <wsdl:input element="OrderRequest" />, the element attribute
has the value of a QName so since there is no explicit namespace prefix on
OrderRequest, it's namespace is whatever has been set via an xmlns
attribute. If no default namespace has been set then its value is "No

However, whatever namespace is associated with OrderRequest, WSDL requires
that one of two conditions hold: 

1. The namespace was declared inline in the <types> section via <xs:schema> 
2. The namespace was imported in the <types> section via <xs:import> 

An <xs:import> MUST reference a namespace. 

However, ever since we made the change requested by Ram to not require a
target namespace on the <xs:schema> element, we now allow the <xs:schema> to
have no targetnamespace. This allows OrderRequest to have no namespace. I
raised this during an implementor's call as a possible unintended
side-effect of Ram's change. 

I recall that the WG thought it was a bad idea to allow no namespace global
element declarations in messages (and I assume faults). If that's the case,
then I recommend we had the following component model assertion: 

An InterfaceMessageReference MUST NOT refer to an XSD global element
declaration that has no namespace. 
An  InterfaceFault MUST NOT refer to an XSD global element declaration that
has no namespace. 

We could therefore have GED's that have no namespace in our component model
(or maybe exclude then along the lines of Roberto's pruning recommendation),
but we couldn't refer to them from WSDL components. 

Arthur Ryman,
IBM Software Group, Rational Division

blog: http://ryman.eclipsedevelopersjournal.com/
phone: +1-905-413-3077, TL 969-3077
assistant: +1-905-413-2411, TL 969-2411
fax: +1-905-413-4920, TL 969-4920
mobile: +1-416-939-5063, text: 4169395063@fido.ca 

Jacek Kopecky <jacek.kopecky@deri.org> 
Sent by: www-ws-desc-request@w3.org 

02/09/2007 03:42 AM 


Jonathan Marsh <jonathan@wso2.com> 




Re: References in the default namespace




I'm not sure if the WSDL spec should say anything about this. XML Schema
refers to XML Namespaces where QName is defined as either prefixed or
unprefixed, and in XML the resolution of unprefixed is in the default
namespace, and prefixed goes according to the namespaces declared with

It sure should be legal in WSDL as well.

On Thu, 2007-02-08 at 22:31 -0800, Jonathan Marsh wrote:
> Is this legal?
>  <wsdl:interface name="Order"
> xmlns="http://www.w3.org/2002/ws/sawsdl/spec/wsdl/order#">
>     <wsdl:operation name="order"
> pattern="http://www.w3.org/2006/01/wsdl/in-out">
>       <wsdl:input element="OrderRequest" />
>       <wsdl:output element="OrderResponse" />
>     </wsdl:operation>
>   </wsdl:interface>
> Or must I define a prefix for the QName?
>   <wsdl:interface name="Order"
> xmlns:order="http://www.w3.org/2002/ws/sawsdl/spec/wsdl/order#">
>     <wsdl:operation name="order"
> pattern="http://www.w3.org/2006/01/wsdl/in-out">
>       <wsdl:input element="order:OrderRequest" />
>       <wsdl:output element="order:OrderResponse" />
>     </wsdl:operation>
>   </wsdl:interface>
> The section on QName resolution doesn't say that an NCName in element
> is interpreted as a local name in the default namespace.  Should it?
> Or is that obvious to everyone but me?  What does XML Schema do?
> Jonathan Marsh - http://www.wso2.com -
> http://auburnmarshes.spaces.live.com
Received on Saturday, 10 February 2007 00:14:13 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:55:03 UTC