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

Re: What is the difference between a "struct" and an "array" in the e dge case?

From: Marc Hadley <marc.hadley@sun.com>
Date: Tue, 02 Jul 2002 14:12:30 +0100
Message-ID: <3D21A6BE.2010506@sun.com>
To: Jacek Kopecky <jacek@systinet.com>
CC: Kevin Johnsrude <kevinj@roguewave.com>, xml-dist-app@w3.org

Jacek Kopecky wrote:
>  Marc, Kevin, 
>  I believe that since in array the names are irrelevant, we must 
> not assume that they are the same. The name may be used for type 
> matching (if using some schema validation as suggested in 
> http://www.w3.org/TR/soap12-part2/#encschema ) or it may be 
> generated or (usually) it can be the same (like 'item' or 
> something) but the latter is just one of the options.
Hmmm, thats not my reading of it. The rules in [1] are:

"1. For a graph edge which is distinguished by label ("struct" or 
"generic"), the namespace name and local name properties of the element 
information item together determine the value of the edge label.
  2. For a graph edge which is distinguished by position ("array" or 
     * The ordinal position of the graph edge corresponds to the 
position of the element information item relative to its siblings
     * If outbound edges are distinguished only by position ("array") 
then the local name and namespace name properties of the element 
information item are not significant."

If the names of the child elements are not the same then the outbound 
edges are NOT distinguished only by position (see 2, bullet 2 above) and 
hence you have a generic rather than an array.

I agree that the actual names of the array elements are not significant 
(although, as Jacek notes, they can be used for type matching) but they 
should all be the same.


[1] http://www.w3.org/TR/2002/WD-soap12-part2-20020626/#complexenc

> On Tue, 2 Jul 2002, Marc Hadley wrote:
>  >  > Kevin Johnsrude wrote:
>  > > In SOAP 1.2, 3.1.2 "Encoding compound values" [1], is there any way to
>  > > distinguish between a "struct" and an "array" that has neither an "itemType"
>  > > nor an "arraySize" attribute?  Note that this appears to be permitted per
>  > > item 3.
>  > >  > IIRC, an array's child elements all have the same name. A struct's child 
>  > elements all have different names. A generics child elements can be a 
>  > mixture of the two.
>  >  > So, for a struct or array with only one child element then its difficult 
>  > to tell the difference without the attributes.
>  >  > Regards,
>  > Marc.
>  >  > > [1] http://www.w3.org/TR/2002/WD-soap12-part2-20020626/#complexenc
>  > >  >  >  >  > 

Marc Hadley <marc.hadley@sun.com>
XML Technology Centre, Sun Microsystems.
Received on Tuesday, 2 July 2002 09:12:39 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 22:01:20 UTC