Re: Proposed resolution for rec issue 21

Marc Hadley suggets:

> "The array's dimensions are represented by each item in
> the list of sizes (unspecified size in case of the
> asterisk). The number of items in the list represents
> the number of dimensions in the array, dimensions are
> listed in order from most significant to least
> significant. The asterisk, if present, MUST only appear
> in the first position in the list.  The default value
> of the arraySize attribute information item is "*",
> that is by default arrays are considered to have a
> single dimension of unspecified size."

First, I think I can easily live with this proposal.  So, take the 
following as exploring the space a bit, not pushing hard for alternatives.

That said, I think it's interesting to ask more carefully what it  means 
to assign an order as in "most significant to least". 

First of all, our data model says nothing at all about dimensions as far 
as I can see [1]:

        "A graph node whose outbound edges are
        distinguished solely by position is
        known as an "array". The outbound edges
        of an array MUST NOT be labeled."

Nothing about dimensions there.  The main part of the encoding section on 
arrays says nothing either [2]:

        "For a graph edge which is distinguished
        by position:

        The ordinal position of the graph edge
        corresponds to the position of the child
        element information item relative to its
        siblings

        The [local name] and [namespace name]
        properties of the child element
        information item are not significant.

        [...]

        The following rules apply to the
        encoding of a graph node that represents
        an "array":

        * The element information item
          representing an array node MAY have
          among its attributes an itemType
          attribute information item (see 3.1.4.1
          itemType Attribute Information Item).

        * The element information item
          representing an array node MAY have
          among its attributes an arraySize
          attribute information item (see 3.1.6 
          arraySize Attribute Information Item). "


Still nothing about dimensions.  Then we get [3]:

        "3.1.6 arraySize Attribute Information
        Item The arraySize attribute information
        item has the following Infoset
        properties:

        A [local name] of arraySize . 

        A [namespace name] of
        "http://www.w3.org/2003/05/soap-encoding".

        The type of the arraySize attribute
        information item is enc:arraySize. The
        value of the arraySize attribute
        information item MUST conform to the
        following EBNF grammar
 
        [...skipped for brevity...NRM]

        The array's dimensions are represented
        by each item in the list of sizes
        (unspecified size in case of the
        asterisk). The number of items in the
        list represents the number of dimensions
        in the array. The asterisk, if present,
        MUST only appear in the first position
        in the list. The default value of the
        arraySize attribute information item is
        "*", that is by default arrays are
        considered to have a single dimension of
        unspecified size."

OK, so out of the blue we get a notion of dimension that seems completely 
disconnected from the data model or the rest of the array encoding. 
Nothing here seems to say that the number of elements serialized must 
relate to the list of sizes, as one might assume.  Some notion of multiple 
dimensions seems to be grafted on as an artifact of this serialization 
attribute. 

I >think< that's what's intended might be more carefully captured as:

        "The arraySize attribute SHOULD be used
        when it is desired to 
        to suggest a mapping of SOAP compound
        values distinguished by position to
        fixed size or multi-dimensional program
        array data structures.  By convention,
        the mapping is established such that the
        array's dimensions are represented by
        each item in the list of sizes
        (unspecified size in case of the
        asterisk). The number of items in the
        list represents the number of dimensions
        in the mapped array.  The subscript that
        changes most slowly appears first, with
        others if any following in order; the
        asterisk, if present, MUST only appear
        in the first position in the list. The
        default value of the arraySize attribute
        information item is "*", suggesting that
        by default arrays are to be mapped to
        program structures of a single dimension
        with unspecified size."

Again, I can easily live with Mark's formulation, but I find this whole 
part of the spec to be unfortunately confusing and imprecise.  Does the 
text I've written above match what people really think is going on?  Might 
it be worth making these more careful clarifications?  Thank you.

Noah

[1] http://www.w3.org/2000/xp/Group/2/06/LC/soap12-part2.html#values
[2] http://www.w3.org/2000/xp/Group/2/06/LC/soap12-part2.html#complexenc
[3] 
http://www.w3.org/2000/xp/Group/2/06/LC/soap12-part2.html#arraySizeattr


--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------

Received on Tuesday, 1 June 2004 21:52:50 UTC