W3C home > Mailing lists > Public > xml-dist-app@w3.org > April 2002

Re: Proposal for dealing with root

From: Jacek Kopecky <jacek@systinet.com>
Date: Tue, 23 Apr 2002 13:53:46 +0200 (CEST)
To: Martin Gudgin <martin.gudgin@btconnect.com>
cc: XML Protocol Discussion <xml-dist-app@w3.org>
Message-ID: <Pine.LNX.4.44.0204231347260.1979-100000@mail.idoox.com>
 Gudge, generally I like it, with just one remark inline.

                   Jacek Kopecky

                   Senior Architect, Systinet (formerly Idoox)
                   http://www.systinet.com/



On Tue, 23 Apr 2002, Martin Gudgin wrote:

 > This is a proposal for dealing with the notion of root ( and hence the root
 > attribute ) in our spec.
 > 
 > The current data model and encoding rules do not talk about 'independent
 > elements' AKA 'top-level multirefs'. The implication is that nodes with
 > multiple inbound edges are always serialized in-line.
 > 
 > If independent elements do not exist then there are two possible scenarios
 > regarding the root;
 > 
 > 1.    The graph has no root
 > 
 > 2.    Each root of the graph is encoded as the outermost element of a
 > serialization.
 > 
 > In either case, the root attribute is unnecessary as each case can be
 > determined by inspection.
 > 
 > Proposal;
 > 
 > a) Leave the root attribute out of the spec ( it is not in the current
 > editors copy ). Close the current 'todo' on the editors to 'add the notion
 > of root to the data model' by stating;
 > 
 >   'A graph node that has no inbound edges is a root of the graph.'

What we needed is not a graph root but a serialization root. You 
define the former, I don't know at the moment how one could 
easily define the latter. Consider the following case:
  <env:Body>
    <m:foo encodingStyle="{soap-encoding}" id="id1">
      <m:value>42</m:value>
      <m:next ref="id1"/>
    </m:foo>
  </env:Body>
It's a circular graph and the serialization root is not a graph 
root (this graph has no root).

I'd propose that if we don't come up with a definition of a 
seriailzation root (as I cannot at the moment), we can just skip 
this as I don't feel a strong need for this definition anyway.

Below, I think you also mean to talk about serialization roots as 
opposed to graph roots.

 > b) Ensure that the language in the encoding section mandates that all nodes
 > are serialized in-line, including nodes with multiple inbound edges ( if we
 > feel the language is not strong enough already ).
 > 
 > Note: I've said 'a root/serialization' instead of 'the root/serialization'
 > to leave in the possibility of having multiple roots to a graph. This may
 > arise where there are references in a Header block to nodes in the Body ( or
 > vice versa, or references in one Header block to another ). e.g.
 > 
 > <s:Envelope xmlns:s='http://www.w3.org/2001/12/soap-envelope' >
 >  <s:Header>
 >   <h:MyHeader xmlns:h='http://example.org/headers' >
 >    <h:Data s:encodingStyle='http://www.w3.org/2001/12/soap-encoding'>
 >      <h:d>Quux</h:d>
 >      <h:e ref='id1' />
 >    </h:Data>
 >   </h:MyHeader>
 >  </s:Header>
 >  <s:Body>
 >   <r:Request xmlns:r='http://example.org/requests' >
 >    <r:Data s:encodingStyle='http://www.w3.org/2001/12/soap-encoding'>
 >      <r:a id='id1'>Foo</r:a>
 >      <r:b>Bar</r:b>
 >      <r:c>Baz</r:c>
 >    </r:Data>
 >   </r:Request>
 >  </s:Body>
 > </s:Envelope>
 > 
 > 
 > Which gives us the following graph;
 > 
 > 
 > --------           ---------
 > |      |  Edge d   |       |
 > |      |---------->| Quux  |
 > |      |           |       |
 > --------           ---------
 >    |
 >    |             ----------
 >    |   Edge e    |id1     |
 >    ------------->|  Bar   |
 >                  |        |
 >                  ----------
 >                     ^
 >         Edge a      |
 >    ------------------
 >    |
 >    |
 > -------            --------
 > |     |  Edge b    |      |
 > |     |----------->| Bar  |
 > |     |            |      |
 > -------            --------
 > 
 > Where the two empty boxes are both roots of the graph ( and are represented
 > in the XML by the two Data elements.
 > 
 > Gudge
 > 
Received on Tuesday, 23 April 2002 08:10:07 GMT

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