RE: References in the default namespace

Jonathan, 
I don't think it's just folklore - XML Schema uses qnames for references
as well, and if I understand it correctly, section 3.15.3 of schema
structures [1] defines how qnames are resolved, including how the
default namespace comes into play.
Attribute names in XML content are the only case that I know of where
the rules are different.
Jacek

[1] http://www.w3.org/TR/xmlschema-1/#src-qname

On Fri, 2007-02-09 at 15:43 -0800, Jonathan Marsh wrote:
> If I understand you correctly, you are saying that the xs:QName type takes
> the default namespace when the prefix is omitted, and that by declaring
> @element as an xs:QName, we exhibit this behavior as well.
> 
> I don't find the reference from XML Schema to Namespaces totally conclusive,
> as Namespaces defines rules for unprefixed constructs specifically for each
> type of construct (unprefixed element names take the default namespace if
> there is one, or take a null namespace if there isn't; while unprefixed
> attribute names don't take the prefix.)  There aren't any conclusive
> statements there about the behavior of QNames in content within the
> Namespaces document.
> 
> XPath was very careful to define the meaning of prefixed and unprefixed
> element names in its syntax.  I haven't found anything as comprehensive
> about QNames.
> 
> At this point though, folklore is good enough, and I'll fix wsdl-xslt to
> recognize unprefixed QName references as belonging to the default
> namespace...
> 
> Jonathan Marsh - http://www.wso2.com - http://auburnmarshes.spaces.live.com
>  
> 
> > -----Original Message-----
> > From: Jacek Kopecky [mailto:jacek.kopecky@deri.org]
> > Sent: Friday, February 09, 2007 12:43 AM
> > To: Jonathan Marsh
> > Cc: www-ws-desc@w3.org
> > Subject: Re: References in the default namespace
> > 
> > Jonathan,
> > 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
> > prefixes.
> > 
> > It sure should be legal in WSDL as well.
> > Jacek
> > 
> > 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 13:16:13 UTC