[
https://issues.apache.org/jira/browse/TUSCANY-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517375
]
Pete Robbins commented on TUSCANY-1504:
---------------------------------------
I believe this is working as per the specification but I will ask for a
clarification. The spec says:
>>>>>>>>>>>>
Element in all, choice, or sequence
<[GROUP] maxOccurs=[G_MAX]>
<element name=[NAME]
type=[TYPE]
maxOccurs=[E_MAX] />
</[GROUP] >
where
[GROUP] = all, choice, sequence
• Element groups and model groups are treated as if they were expanded in
place.
• Nested [GROUP]s are expanded. Property name=[NAME]
type=[TYPE]
many=true
Type sequenced=true
• A property is created for every element
• many=true when E_MAX or G_MAX is > 1
• sequenced=true if the content allows elements to be interleaved. (for
example <A/><B/><A/>)
• sequenced=true if G_MAX > 1 and there is more than one element in this
group or a contained group.
• Property declarations are the same whether group is <all> or <choice>
or <sequence>
• Property behavior ignores group declarations.
• Validation of DataObjects for the group constraints is external to the
DataObject interface.
<<<<<<<<<<<<<
The key statements are
> sequenced=true if the content allows elements to be interleaved. (for
> example <A/><B/><A/>)
> sequenced=true if G_MAX > 1 and there is more than one element in this group
> or a contained group.
So in your example neither of these is true as you have a sequence of elements
with maxOccurs=1 (the default). A "Sequenced DataObject" records the order of
the settings of the properties when the elements can be interleaved. In your
example there can only ever be one instance of each property (element) and so
the sequence in which they were set is not relevent. The properties are defined
on the Type in the order declared in the sequence so you could access them in
order by property index.
Cheers,
> getSequence() returns null with a complexType defined without mixed="true"
> --------------------------------------------------------------------------
>
> Key: TUSCANY-1504
> URL: https://issues.apache.org/jira/browse/TUSCANY-1504
> Project: Tuscany
> Issue Type: Bug
> Components: C++ SDO
> Affects Versions: Cpp-M3
> Reporter: Matthew Schultz
> Attachments: letter.xsd
>
>
> getSequence returns null if complextType does not have the mixed attribute or
> the mixed attribute is set to false.
> Looking at the code, SDOSchemaSAX2Parser::startComplexType and
> SDOSchemaSAX2Parser::defineType appears to be the two places that
> isSequenced is set. In startComplexType, it appears that both mixed and
> sequence are both treated as an attribute. I cannot tell if it ever
> reads the child <sequence>.
> It appears that isSequenced should be set to true on the basis of the
> child <sequence> and not on the basis of mixed.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]