Brian,
First of all, the sdo:sequence annotation is just one (probably the most
unlikely) way to create a sequenced type from XSD. The most common way is
to create a "mixed" complexType. That's really what SDO Sequence was
designed for.
That said, looking at the code, it looks like it is supported. If you have
a test case that illustrates a problem, please open a JIRA. I'd suggest
separate test cases for readOnly and sequence. It's harder to debug two
presumably unrelated problems in one test :-)
Frank.
"Brian Murray" <[EMAIL PROTECTED]> wrote on 03/20/2007 03:38:18
PM:
> I believe that both XSDHelper and XSD2JavaGenerator are not properly
> accounting for sequence and read-only indicators in the XSD. I have a
test
> case which I can attach to the Jira. I'm appending my XSD below because
the
> problem may lie in my XSD.
>
> If I define the Type with the TypeHelper using
> readOnlyProperty.setBoolean("readOnly", true);
> and
> seqType.setBoolean("sequenced", true);
> Then the test case passes.
>
> I created the XSD from my understanding of the 2.1 Spec. (sdo:sequence
- p.
> 84 of 2.1 and sdo:readOnly - pp.107, 108). I'll open a Jira unless
> somebody can tell me how I've misunderstood the spec.
>
> The XSD:
>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sdo="
> commonj.sdo" xmlns:simple="http://example.com/ExpectedException"
> targetNamespace="http://example.com/ExpectedException">
> <xsd:import namespace="commonj.sdo" schemaLocation="sdoModel.xsd"/>
>
> <xsd:element name="expectedExceptionsElem"
> type="simple:ExpectedExceptionType"/>
>
> <xsd:complexType name="ExpectedExceptionType">
> <xsd:sequence>
> <xsd:element name="stringVal" type="sdo:String"/>
> <xsd:element name="booleanVal" type="sdo:Boolean"/>
> <xsd:element name="booleanVal2" type="sdo:Boolean"/>
> <xsd:element name="byteVal" type="sdo:Byte"/>
> <xsd:element name="stringVal2" type="sdo:String"/>
> <xsd:element name="decimalVal" type="sdo:Decimal"/>
> <xsd:element name="decimalVal2" type="sdo:Decimal"/>
> <xsd:element name="intVal" type="sdo:Int"/>
> <xsd:element name="floatVal" type="sdo:Float"/>
> <xsd:element name="doubleVal" type="sdo:Double"/>
> <xsd:element name="dateVal" type="sdo:Date"/>
> <xsd:element name="shortVal" type="sdo:Short"/>
> <xsd:element name="longVal" type="sdo:Long"/>
> <xsd:element maxOccurs="unbounded" minOccurs="0"
name="listVal"
> type="sdo:String"/>
> <xsd:element name="bytesVal" type="sdo:Bytes"/>
> <xsd:element name="integerVal" type="sdo:Integer"/>
> <xsd:element name="charVal" type="sdo:Character"/>
> <xsd:element name="readOnlyVal" sdo:readOnly="true"
> type="sdo:String"/>
> <xsd:element name="readOnlyListVal" sdo:readOnly="true"
> type="sdo:String"/>
> </xsd:sequence>
> </xsd:complexType>
>
> <xsd:element name="sequencedReadOnlyElem"
> type="simple:SequenceReadOnlyType"/>
>
> <xsd:complexType sdo:sequence="true" name="SequenceReadOnlyType">
> <xsd:sequence>
> <xsd:element name="readOnlyVal" sdo:readOnly="true"
> type="sdo:String"/>
> <xsd:element name="readOnlyListVal" sdo:readOnly = "true"
> type="sdo:String"/>
> <xsd:element name="uniqueName" type="sdo:String"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:schema>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]