W3C home > Mailing lists > Public > www-ws-desc@w3.org > April 2005

Re: Proposed resolution to LC 77a

From: Hugo Haas <hugo@w3.org>
Date: Fri, 8 Apr 2005 12:04:58 +0200
To: "Rogers, Tony" <Tony.Rogers@ca.com>
Cc: David Orchard <dorchard@bea.com>, www-ws-desc@w3.org
Message-ID: <20050408100458.GC30579@w3.org>
* Rogers, Tony <Tony.Rogers@ca.com> [2005-04-08 07:45+1000]
> Jonathan made a good point during the call.
>  
> Suppose w have a schema document which contains:
>  
> <a xmlns="A"/>
> <b xmlns="B"/>
>  
> so both a and b have been defined with no namespace prefix, but with different namespaces.
>  
> What happens here? Or with:
>  
> <a xmlns:c="A"/>
> <a xmlns:c="B"/>
>  
> How do I disambiguate "a"?

Indeed, there are a number of ways that we can break Dave's algorithm.

For it to work, the critical question is: can we make sure that the
instance data uses the same namespace prefixes that were declared in
the Schema?

Let's take a simple case:

  <xs:element name="foo"
              xmlns:a="http://example.com/1"
	      xmlns:b="http://example.com/2">
    <xs:complexType>
      <xs:sequence>
	<xs:element ref="a:c"/>
	<xs:element ref="b:c"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

I can be tempted to use for my XML representation:

  <foo xmlns:a="http://example.com/1"
       xmlns:b="http://example.com/2">
    <a:c>1</a:c>
    <b:c>2</b:c>
  </foo>

and serialize as:

  a:c=1&b:c=2

This is Dave's 80-20 case.

The application/x-www-form-urlencoded serialization could have a rule
which says to use the same namespace prefixes than the ones you found
in the schema.

However, the schema itself could exist in different equivalent
versions, with different prefixes used, so we'd need to be sure we
know what schema document we're talking about, which I'm not sure we
can achieve with the abstraction of {element declarations} in our
component model.

-- 
Hugo Haas - W3C
mailto:hugo@w3.org - http://www.w3.org/People/Hugo/

Received on Friday, 8 April 2005 10:04:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:58:35 GMT