Proposal for dealing with root

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.'


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 05:08:50 UTC