W3C home > Mailing lists > Public > public-xsd-databinding@w3.org > February 2006

Re: ISSUE-22: Bare Vectors

From: <Paul.V.Biron@kp.org>
Date: Wed, 22 Feb 2006 15:27:47 -0800
To: Paul.V.Biron@kp.org
Cc: public-xsd-databinding@w3.org, public-xsd-databinding-request@w3.org
Message-Id: <OFAE31BF2F.6064B257-ON8825711D.00808B4E-8825711D.0080E0FE@KP.ORG>

> Schema allows allows for:
> 
>         <xs:simpleType name='myList'>
>                 <xs:itemType name='xs:integer'/>
>         </xs:simpleType>
> 
> And binding tools should be able to be smart about how they represent 
> elements/attributes of these types.

I realized that I should probably give an example of what I mean about 
"being smart" in this context.

We're all used to tools taking:

        <xs:complexType name='myType'>
                <xs:sequence>
                        <xs:element name='child' type='xs:integer' 
maxOccurs='unbounded'/>
                </xs:sequence>
        </xs:complexType>

and producing something like:

        class MyType {
                List<Integer> child ;
                }

And tools that, given 

        <xs:complexType name='myType'>
                <xs:sequence>
                        <xs:element name='child' type='myList' 
maxOccurs='1'/>
                </xs:sequence>
        </xs:complexType>

produce:

        class MyType {
                String child ;
                }

I would like a binding tool that produces the same class when presented 
with both versions of the schema.

pvb
Received on Wednesday, 22 February 2006 23:31:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 18 December 2010 18:20:36 GMT