tuscany-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Millies, Sebastian" <Sebastian.Mill...@softwareag.com>
Subject [SDO] How to declare non-containment properties in xsd?
Date Fri, 02 Dec 2011 15:15:56 GMT
Hello there,

perhaps someone can help me understand the SDO spec as regards containment.

I use SDO’s with types statically defined in an XSD file. Some of these types represent
dependent types that may have masters of different types. The masters of each type
are represented by a list of “anyType”.

Containment prevents me from adding the same head object to the master lists of different
slaves. So I want a non-containment property. The SDO spec talks about this on
p. 107, but my naive attempt to declare a non-containment list-property in my XSD led
to an ArrayStoreException at runtime (when the head object is added to the list).

I attach the complete XSD . Here are the excerpts of the two definitions of the
“masterObjects” property.

a)      with containment (works as expected)

<complexType name="MasterType">
            <!-- group the masters of each type together -->
                  <element name="masterObjects" type="anyType" maxOccurs="unbounded"
            <attribute name="typeName" type="string"></attribute>

b)      without containment (does not work)

<complexType name="MasterType">
            <!-- group the masters of each type together -->
                  <element name="masterObjects" type="anyURI" sdo:propertyType="anyType"
                        maxOccurs="unbounded" minOccurs="0"> </element>
            <attribute name="typeName" type="string"></attribute>

Could anyone please point out the correct way to do this? If necessary, I can provide a JUnit
test case
that demonstrates what I need.

n  Sebastian
IDS Scheer Consulting GmbH
Geschäftsführer/Managing Directors: Kamyar Niroumand, Ivo Totev
Sitz/Registered office: Altenkesseler Straße 17, 66115 Saarbrücken, Germany - Registergericht/Commercial
register: Saarbrücken HRB 19681

View raw message