You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Matthew Schultz (JIRA)" <tu...@ws.apache.org> on 2007/08/02 17:03:52 UTC

[jira] Created: (TUSCANY-1504) getSequence() returns null with a complexType defined without mixed="true"

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


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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1504) getSequence() returns null with a complexType defined without mixed="true"

Posted by "Pete Robbins (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517911 ] 

Pete Robbins commented on TUSCANY-1504:
---------------------------------------

Matthew, the speciifcation is available from here:

http://www.osoa.org/display/Main/Service+Data+Objects+Specifications

> 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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-1504) getSequence() returns null with a complexType defined without mixed="true"

Posted by "Matthew Schultz (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthew Schultz updated TUSCANY-1504:
-------------------------------------

    Attachment: letter.xsd

Here's an example xsd.  If you try to run getSequence on the root data object, getSequence returns null.  If you add mixed="true" to complextType, getSequence returns an object.  

> 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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Issue Comment Edited: (TUSCANY-1504) getSequence() returns null with a complexType defined without mixed="true"

Posted by "Matthew Schultz (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517286 ] 

Matthew Schultz edited comment on TUSCANY-1504 at 8/2/07 8:07 AM:
------------------------------------------------------------------

Here's an example xsd.  If you try to run getSequence on the root data object, getSequence returns null.  If you add mixed="true" to complexType, getSequence returns an object.  


 was:
Here's an example xsd.  If you try to run getSequence on the root data object, getSequence returns null.  If you add mixed="true" to complextType, getSequence returns an object.  

> 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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1504) getSequence() returns null with a complexType defined without mixed="true"

Posted by "Pete Robbins (JIRA)" <tu...@ws.apache.org>.
    [ 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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1504) getSequence() returns null with a complexType defined without mixed="true"

Posted by "Matthew Schultz (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517584 ] 

Matthew Schultz commented on TUSCANY-1504:
------------------------------------------

Check the spec but you might be right.  I am able to access the properties directly through the root object.  I figured that since a sequence was declared, it should be available within getSequence but apparently that may not be the case.  Do you have a link for the spec?

> 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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org