Musings on the way Open Content works in SDO

Document in progress ... state is very raw

A semi-public place to keep and share information on the way open content is spec'ed/implemented and the issues I have with it.

Disclaimer -- this info is a point in time snapshot of my understanding, it may be inaccurate. Feel free to point out my misconceptions.

Basic Stuff

A suitable schema for playing with open content ...

To be able to set a value into a wildcard (<xsd:any>), you have to be able to get hold of a Property that is associated with a global element, the schema above demonstrates one way to create such a beast. In the code you can find the Property that is generated from the element "simple" with ...

so then you might think you should able to do ...

But the thing is that the cardinality of association between the OpenQuote instance and the instance of the Property that's being attached by virtue of the xsd:any wildcard is defined by the global element (not the xsd:any), i.e. in this case the "note" element, and there's no way in schema to constrain the maxOccurs attribute of a global element. The upshot of that is that if you want to add a single Property value as open content, where the Property is derived from an XML Schema global element, you must wrap the value in a Collection...

which gives ...

There is a way programmatically to create Property instances with maxOccurs=1 ...

but if your environment constrains you to creating you metadata from XSD then currently there's no way to achieve this coding style. It has been mooted that a new SDO annotation could be added so that the generated code for the Property could ascribe the 0..1 cardinality behaviour.

So now I need to understand what semantics are placed on the maxOccurs=1 of the xsd:any -- any suggestions most welcome [kelvingoodson@gmail.com]

Open content with maxOccurs > 1

This section being reworked in the light of my newly gained understanding above

Considering the schema ...

The following document ....

is created by the following code ...

Tuscany/TuscanyJava/SDO/ThinkingAloud/OpenContent (last edited 2009-09-20 22:49:08 by localhost)