W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2002

Array Confusion

From: Brenda Bell <bbell@juicesoftware.com>
Date: Wed, 17 Jul 2002 12:43:44 -0400
Message-ID: <846B0B02E1B78B49B678EDCC00EB2962FB4F95@mail01.ent.juice.com>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
My confusion stems from some type definitions I've come across in WSDL
files, but I believe this is truly a question about XML-Schema and how types

I've seen array types defined in two different ways:

Method 1:

      <s:complexType name="StringArray">
        <s:complexContent mixed="false">
          <s:restriction base="soapenc:Array">
              <s:element minOccurs="0" maxOccurs="unbounded" name="String"

Method 2:

      <xs:complexType name="DoubleArray">
          <xs:restriction base="soapenc:Array">
            <xs:attribute ref="soapenc:arrayType" n1:arrayType="xs:double[]"

Method 1 makes perfect sense... given the following element declaration:

  <xs:element name="TestStrings">
      <xs:element name="Data" type="tns:StringArray"></xs:element>

This document is valid (at least, it's valid in XMLSpy :):


However, method 2 has me baffled... given the following element declaration:

  <xs:element name="TestDoubles">
      <xs:element name="Data" type="tns:DoubleArray"></xs:element>

I haven't been able to come up with a valid document.  The Data element
isn't allowed to have text, but the sequence on DoubleArray is empty and
doesn't allow child elements.  What am I missing?

Brenda Bell
Sr. Software Architect
Juice Software, Inc.
Phone: 603.428.3994
Cell:  603.494.8206
Fax:   603.428.8713
Email: bbell@juicesoftware.com
MSN:   bbell@theotherbell.com
Received on Wednesday, 17 July 2002 12:45:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:04 UTC