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

RE: Proposed resolution to LC 77a

From: David Orchard <dorchard@bea.com>
Date: Thu, 21 Apr 2005 14:19:19 -0700
Message-ID: <32D5845A745BFB429CBDBADA57CD41AF0F1C4028@ussjex01.amer.bea.com>
To: <www-ws-desc@w3.org>
My updated proposal is similar to hugo's, except that I propose ignoring the namespace when only a single ns is present in the instance data and I'd like to suggest a couple different lexical forms of the binding.

A simple case without namespaces would be serialized simple:

  <foo>
    <c>1<c>
    <c>2<c>
  </foo>

→ c=1&c=2

Single namespace is serialized by ignoring the namespace the same way:

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

→ c=1&c=2

Multiple namespaces are serialized with full ns:

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

→ xmlns:a=http://example.com/1&xmlns:b=http://example.com/2&a:c=1&b:c=2

(this is option #15 in [1])

Another reasonable option is to do a lexical form of the qname, like using parenthesis
→ &(http://example.com/1)c=1&(http://example.com/2)c=2
(this is option #10 in [1])

Or period separated with ns trailing
→ &c.http://example.com/1=1&c.http://example.com/2=2

(option #11)

Cheers,
Dave

[1] http://www.pacificspirit.com/blog/2004/04/29/binding_qnames_to_uris



> -----Original Message-----
> From: www-ws-desc-request@w3.org [mailto:www-ws-desc-request@w3.org] On
> Behalf Of Hugo Haas
> Sent: Tuesday, April 12, 2005 7:42 AM
> To: www-ws-desc@w3.org
> Subject: Re: Proposed resolution to LC 77a
> 
> * Hugo Haas <hugo@w3.org> [2005-04-08 12:04+0200]
> > 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.
> 
> Having investigated this a little more, because of this abstraction
> and the fact that schema doesn't know about prefixes in the component
> model, it seems that we can't express the constraints that proposed
> option #3 would need.
> 
> An XPointer-like solution would probably be the simplest way to
> support namespaces in a reliable way.
> 
> A simple case without namespaces would be serialized simple:
> 
>   <foo>
>     <c>1<c>
>     <c>2<c>
>   </foo>
> 
> → c=1&c=2
> 
> A simple case using namespaces would be serialized in a not too
> complex way:
> 
>   <a:foo xmlns:a="http://example.com/1">
>     <a:c>1</a:c>
>     <a:c>2</a:c>
>   </a:foo>
> 
> → xmlns:a=http://example.com/1&a:c=1&a:c=2

> 
> And more complex cases would be enabled:
> 
>   <foo xmlns:a="http://example.com/1"
>        xmlns:b="http://example.com/2">
>     <a:c>1</a:c>
>     <b:c>2</b:c>
>   </foo>
> 
> → xmlns:a=http://example.com/1&xmlns:b=http://example.com/2&a:c=1&b:c=2

> 
> We would need to add in the application/x-www-urlencoded text like:
> 
>     Each QName serialized in the URL must have its namespace prefix
>     declared with a query parameter.
> 
> And add a section with the meaning of xmlns:foo as a query parameter.
> 
> I am hesitant about adding such a feature at this point though.
> 
> Cheers,
> 
> Hugo
> 
> --
> Hugo Haas - W3C
> mailto:hugo@w3.org - http://www.w3.org/People/Hugo/

Received on Thursday, 21 April 2005 21:19:24 GMT

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