You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Caroline Maynard (JIRA)" <tu...@ws.apache.org> on 2006/12/12 17:03:22 UTC

[jira] Created: (TUSCANY-988) Xpath doesn't work with nested open properties

Xpath doesn't work with nested open properties
----------------------------------------------

                 Key: TUSCANY-988
                 URL: http://issues.apache.org/jira/browse/TUSCANY-988
             Project: Tuscany
          Issue Type: Bug
          Components: C++ SDO
    Affects Versions: Cpp-current
            Reporter: Caroline Maynard


I'm using the same Jungle schema as before, but this time my bear type is itself open. So the jungle is: 
<schema  
  xmlns="http://www.w3.org/2001/XMLSchema">
  
  <element name="jungle">
    <complexType>
      <sequence>
        <any minOccurs="0" maxOccurs="unbounded"/>
      </sequence>
    </complexType>
  </element>
  
</schema>

and the bear is: 
<schema xmlns="http://www.w3.org/2001/XMLSchema">
   
   <complexType name="bearType">
     <sequence>
       <any minOccurs="0" maxOccurs="unbounded"/>
       <element name= "name" type="string"/>
       <element name= "weight" type="positiveInteger" />
     </sequence>
   </complexType>

</schema>

I load the jungle and the animal schemas into the same data factory. Then create an empty xml document, assign into it a bear, then assign into that bear a second bear. The instance is created fine, and I can access the nested bear or dump out the entire instance: 
<?xml version="1.0" encoding="UTF-8"?>
<jungle xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <bear xsi:type="bearType">
    <name>Mummy Bear</name>
    <weight>700</weight>
    <bear xsi:type="bearType">
      <name>Baby Bear</name>
      <weight>100</weight>
    </bear>
  </bear>
</jungle>

The problem occurs when I try to use Xpath notation to reach the baby bear, so I'm doing a getProperty("bear/bear") on the jungle object. This fails in
commonj::sdo::DataObjectImpl::getPropertyImpl(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & {0x01131b69 "bear/bear"}) line 3228 + 42 bytes
commonj::sdo::DataObjectImpl::getProperty(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & {0x01131b69 "bear/bear"}) line 3205 + 20 bytes
commonj::sdo::DataObjectImpl::getProperty(const char * 0x01a7e840) line 3200 + 59 bytes

because it doesn't handle the name as a potential Xpath, and reaches the end of the iteration without a match. An SDOPropertyNotFoundException is raised with the message "Cannot find property :bear/bear".

-- 
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] Commented: (TUSCANY-988) Xpath doesn't work with nested open properties

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

Caroline Maynard commented on TUSCANY-988:
------------------------------------------

See http://pecl.php.net/bugs/bug.php?id=10842

> Xpath doesn't work with nested open properties
> ----------------------------------------------
>
>                 Key: TUSCANY-988
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-988
>             Project: Tuscany
>          Issue Type: Bug
>          Components: C++ SDO
>    Affects Versions: Cpp-current
>            Reporter: Caroline Maynard
>             Fix For: Cpp-M3
>
>
> I'm using the same Jungle schema as before, but this time my bear type is itself open. So the jungle is: 
> <schema  
>   xmlns="http://www.w3.org/2001/XMLSchema">
>   
>   <element name="jungle">
>     <complexType>
>       <sequence>
>         <any minOccurs="0" maxOccurs="unbounded"/>
>       </sequence>
>     </complexType>
>   </element>
>   
> </schema>
> and the bear is: 
> <schema xmlns="http://www.w3.org/2001/XMLSchema">
>    
>    <complexType name="bearType">
>      <sequence>
>        <any minOccurs="0" maxOccurs="unbounded"/>
>        <element name= "name" type="string"/>
>        <element name= "weight" type="positiveInteger" />
>      </sequence>
>    </complexType>
> </schema>
> I load the jungle and the animal schemas into the same data factory. Then create an empty xml document, assign into it a bear, then assign into that bear a second bear. The instance is created fine, and I can access the nested bear or dump out the entire instance: 
> <?xml version="1.0" encoding="UTF-8"?>
> <jungle xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>   <bear xsi:type="bearType">
>     <name>Mummy Bear</name>
>     <weight>700</weight>
>     <bear xsi:type="bearType">
>       <name>Baby Bear</name>
>       <weight>100</weight>
>     </bear>
>   </bear>
> </jungle>
> The problem occurs when I try to use Xpath notation to reach the baby bear, so I'm doing a getProperty("bear/bear") on the jungle object. This fails in
> commonj::sdo::DataObjectImpl::getPropertyImpl(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & {0x01131b69 "bear/bear"}) line 3228 + 42 bytes
> commonj::sdo::DataObjectImpl::getProperty(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & {0x01131b69 "bear/bear"}) line 3205 + 20 bytes
> commonj::sdo::DataObjectImpl::getProperty(const char * 0x01a7e840) line 3200 + 59 bytes
> because it doesn't handle the name as a potential Xpath, and reaches the end of the iteration without a match. An SDOPropertyNotFoundException is raised with the message "Cannot find property :bear/bear".

-- 
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