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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]