You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Simon Laws (JIRA)" <tu...@ws.apache.org> on 2006/06/22 10:59:29 UTC

[jira] Created: (TUSCANY-488) Global element of simple type problem

Global element of simple type problem
-------------------------------------

         Key: TUSCANY-488
         URL: http://issues.apache.org/jira/browse/TUSCANY-488
     Project: Tuscany
        Type: Bug

  Components: C++ SDO  
    Versions: Cpp-current    
 Environment: Windows XP
    Reporter: Simon Laws
    Priority: Minor


When I read XML (via the XML DAS) that validates against an XSD with a GED
with a complex type and then write it out again (via the XML DAS) the output
matches the input, for example,

IN XSD:
<schema xmlns="..."
 <complexType name="ComplexTypeContentType">
   <sequence>
     <element name="SimpleTypeWithName" type="string"/>
   </sequence>
 </complexType>
 <element name="RootElement7" type="tns:ComplexTypeContentType"/>
</schema>

IN XML:
<tns:RootElement7 xmlns:tns="...">
   <SimpleTypeWithName>SimpleTypeWithName</SimpleTypeWithName>
</tns:RootElement7>

OUT XML:
<RootElement7 xmlns="...">
   <SimpleTypeWithName>SimpleTypeWithName</SimpleTypeWithName>
</RootElement7>


So all is well. When I repeat this execise with a GED with a simple type
rather than a complex type then the output doesn't match the input.

IN XSD:
<schema xmlns="...">
 <simpleType name="SimpleTypeWithNameType">
   <restriction base="string"/>
 </simpleType>
 <element name="RootElement6" type="tns:SimpleTypeWithNameType"/>
</schema>

IN XML:
<tns:RootElement6 xmlns:tns="... ">
   tns:RootElement1
</tns:RootElement6>

OUT XML:
<RootElement6 xmlns="...">
   <RootElement6>tns:RootElement1</RootElement6>
</RootElement6>

SDO has problems problems working out how to hold onto the value of the simple type at the top level of the data object tree because, with a 
simple type, there is no data object to holds the property that is the simple type. 

GEDs of simple type don't occur that often in the real world but it is a likely candidate for the first simple test of a new user. Hence it gives
a bad impression if it doesn;t work as expected. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-488) Global element of simple type problem

Posted by "Yang ZHONG (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-488?page=all ]

Yang ZHONG updated TUSCANY-488:
-------------------------------

    Attachment: fidelity.xsd
                488.xml

Loaded Root Object shouldn't have been a RootType instance.
In another word, XML Document Root Object shouldn't have been another XML Document.

"fidelity.xsd" and "488.xml" are attached for the following Test Case:

int sdotest::testFidelity()
{
    DataFactoryPtr mdg  = DataFactory::getDataFactory();
        
    XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
    xsh->defineFile("fidelity.xsd");
    XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg);

    XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("488.xml");
    DataObjectPtr root = myXMLDocument->getRootDataObject();
    const char* p = root->getType().getName();
    if(!strcmp(p, "RootType"))
        return 0;

    return 1;
}

> Global element of simple type problem
> -------------------------------------
>
>                 Key: TUSCANY-488
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-488
>             Project: Tuscany
>          Issue Type: Bug
>          Components: C++ SDO
>    Affects Versions: Cpp-current
>         Environment: Windows XP
>            Reporter: Simon Laws
>            Priority: Minor
>             Fix For: Cpp-current
>
>         Attachments: 488.xml, fidelity.xsd
>
>
> When I read XML (via the XML DAS) that validates against an XSD with a GED
> with a complex type and then write it out again (via the XML DAS) the output
> matches the input, for example,
> IN XSD:
> <schema xmlns="..."
>  <complexType name="ComplexTypeContentType">
>    <sequence>
>      <element name="SimpleTypeWithName" type="string"/>
>    </sequence>
>  </complexType>
>  <element name="RootElement7" type="tns:ComplexTypeContentType"/>
> </schema>
> IN XML:
> <tns:RootElement7 xmlns:tns="...">
>    <SimpleTypeWithName>SimpleTypeWithName</SimpleTypeWithName>
> </tns:RootElement7>
> OUT XML:
> <RootElement7 xmlns="...">
>    <SimpleTypeWithName>SimpleTypeWithName</SimpleTypeWithName>
> </RootElement7>
> So all is well. When I repeat this execise with a GED with a simple type
> rather than a complex type then the output doesn't match the input.
> IN XSD:
> <schema xmlns="...">
>  <simpleType name="SimpleTypeWithNameType">
>    <restriction base="string"/>
>  </simpleType>
>  <element name="RootElement6" type="tns:SimpleTypeWithNameType"/>
> </schema>
> IN XML:
> <tns:RootElement6 xmlns:tns="... ">
>    tns:RootElement1
> </tns:RootElement6>
> OUT XML:
> <RootElement6 xmlns="...">
>    <RootElement6>tns:RootElement1</RootElement6>
> </RootElement6>
> SDO has problems problems working out how to hold onto the value of the simple type at the top level of the data object tree because, with a 
> simple type, there is no data object to holds the property that is the simple type. 
> GEDs of simple type don't occur that often in the real world but it is a likely candidate for the first simple test of a new user. Hence it gives
> a bad impression if it doesn;t work as expected. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-488) Global element of simple type problem

Posted by "ant elder (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-488?page=all ]

ant elder updated TUSCANY-488:
------------------------------

    Fix Version/s: Cpp-current

> Global element of simple type problem
> -------------------------------------
>
>                 Key: TUSCANY-488
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-488
>             Project: Tuscany
>          Issue Type: Bug
>          Components: C++ SDO
>    Affects Versions: Cpp-current
>         Environment: Windows XP
>            Reporter: Simon Laws
>            Priority: Minor
>             Fix For: Cpp-current
>
>
> When I read XML (via the XML DAS) that validates against an XSD with a GED
> with a complex type and then write it out again (via the XML DAS) the output
> matches the input, for example,
> IN XSD:
> <schema xmlns="..."
>  <complexType name="ComplexTypeContentType">
>    <sequence>
>      <element name="SimpleTypeWithName" type="string"/>
>    </sequence>
>  </complexType>
>  <element name="RootElement7" type="tns:ComplexTypeContentType"/>
> </schema>
> IN XML:
> <tns:RootElement7 xmlns:tns="...">
>    <SimpleTypeWithName>SimpleTypeWithName</SimpleTypeWithName>
> </tns:RootElement7>
> OUT XML:
> <RootElement7 xmlns="...">
>    <SimpleTypeWithName>SimpleTypeWithName</SimpleTypeWithName>
> </RootElement7>
> So all is well. When I repeat this execise with a GED with a simple type
> rather than a complex type then the output doesn't match the input.
> IN XSD:
> <schema xmlns="...">
>  <simpleType name="SimpleTypeWithNameType">
>    <restriction base="string"/>
>  </simpleType>
>  <element name="RootElement6" type="tns:SimpleTypeWithNameType"/>
> </schema>
> IN XML:
> <tns:RootElement6 xmlns:tns="... ">
>    tns:RootElement1
> </tns:RootElement6>
> OUT XML:
> <RootElement6 xmlns="...">
>    <RootElement6>tns:RootElement1</RootElement6>
> </RootElement6>
> SDO has problems problems working out how to hold onto the value of the simple type at the top level of the data object tree because, with a 
> simple type, there is no data object to holds the property that is the simple type. 
> GEDs of simple type don't occur that often in the real world but it is a likely candidate for the first simple test of a new user. Hence it gives
> a bad impression if it doesn;t work as expected. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org