ws-calendar — archive
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
— [Date Index]
| [Thread Index]
| [Month Index]
| [List Home]
Schema questions
Removing the substitutionGroup for components was relatively painless. For properties it will be different:
I tried replacing the simple array of properties which used
substitutionGroup to something like
<xs:complexType name="ArrayOfEventContainedProperties"> <xs:sequence> <xs:choice minOccurs="0" maxOccurs="unbounded"> <!-- Exactly once --> <xs:element ref="xcal:dtstamp"/> <xs:element ref="xcal:uid"/> ... <!-- 0 or more occurrences --> <xs:element ref="xcal:attach"/> ... <xs:element ref="xcal:resources"/> <xs:element ref="xcal:rdate"/> </xs:choice> </xs:sequence> </xs:complexType>
This still doesn't define how many times an element may occur and it has
the undesirable characteristic (in Java anyway) that the resulting class
is List<Object>.
However, it does have at least one good characteristic - the elements
may appear in any order which is typically what happens. Also, when
using the generated classes it is possible to iterate over the list of
properties rather than name each one explicitly.
It would be possible to remove the choice and simply list each element
with a minOccurs/maxOccurs. Now we've imposed ordering which may be an
issue. Also we cannot express all the possibilities for some of the
elements. For example there are various valid combinations of
dtstart/end/duration which depend on semantics that cannot be expressed
in the schema.
--
Mike Douglass
[email protected]
Senior Systems Programmer Communication& Collaboration Technologies
518 276 6780(voice) 2809 (fax)
Rensselaer Polytechnic Institute 110 8th Street,
Troy, NY 12180
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
— [Date Index]
| [Thread Index]
| [Month Index]
| [List Home]