JOIN with objectRef

Hello. I’m working whit Tamino 4.1.4.1 and I have a prolem. I have two doctypes (customer, order) that one (order) is conected to the other (customer) with objectref.

<?xml version = "1.0" encoding = "UTF-8"?>
<xs:schema xmlns:tsd = “http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition” xmlns:xs = “XML Schema”>
xs:annotation
xs:appinfo
<tsd:schemaInfo name = “customer”>
<tsd:collection name = “shop”></tsd:collection>
<tsd:doctype name = “customer”>
tsd:logical
tsd:contentclosed</tsd:content>
</tsd:logical>
</tsd:doctype>
tsd:adminInfo
tsd:server4.1.4.1</tsd:server>
tsd:modified2004-05-18T13:04:20.711+01:00</tsd:modified>
tsd:created2004-05-18T13:04:20.711+01:00</tsd:created>
tsd:versionTSD4</tsd:version>
</tsd:adminInfo>
</tsd:schemaInfo>
</xs:appinfo>
</xs:annotation>
<xs:element name = “customer”>
xs:complexType
xs:sequence
<xs:element name = “name” type = “xs:string”></xs:element>
<xs:element name = “address” type = “xs:string”></xs:element>
</xs:sequence>
<xs:attribute name = “ID” type = “xs:NMTOKEN” use = “required”>
xs:annotation
xs:appinfo
tsd:attributeInfo
tsd:physical
tsd:native
tsd:index
tsd:standard</tsd:standard>
</tsd:index>
</tsd:native>
</tsd:physical>
</tsd:attributeInfo>
</xs:appinfo>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>



<?xml version = "1.0" encoding = "UTF-8"?>
<xs:schema xmlns:tsd = “http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition” xmlns:xs = “XML Schema”>
xs:annotation
xs:appinfo
<tsd:schemaInfo name = “order”>
<tsd:collection name = “shop”></tsd:collection>
<tsd:doctype name = “order”>
tsd:logical
tsd:contentclosed</tsd:content>
</tsd:logical>
</tsd:doctype>
</tsd:schemaInfo>
</xs:appinfo>
</xs:annotation>
<xs:element name = “order”>
xs:complexType
xs:sequence
<xs:element name = “customer”>
xs:complexType
<xs:attribute name = “ID” type = “xs:NMTOKEN” use = “required”>
xs:annotation
xs:appinfo
tsd:attributeInfo
tsd:physical
tsd:native
tsd:index
tsd:standard</tsd:standard>
</tsd:index>
tsd:objectRef
tsd:collectionRefshop</tsd:collectionRef>
<tsd:accessPredicate operator = “=”>
tsd:nodeRefcustomer/@ID</tsd:nodeRef>
</tsd:accessPredicate>
</tsd:objectRef>
</tsd:native>
</tsd:physical>
</tsd:attributeInfo>
</xs:appinfo>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name = “price” type = “xs:string”></xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

I have inserted this two documents:


Peter
Times Square




12345


When I try to execute this X-Query thru Tamino Interactive Interface
the response is:

/order/customer/name

<?xml version="1.0" encoding="windows-1252" ?>
- <ino:response xmlns:ino=“http://namespaces.softwareag.com/tamino/response2” xmlns:xql=“XQL FAQ (XML Query Language - Frequently Asked Questions)”>
xql:query/order/customer/name</xql:query>
- <ino:cursor ino:handle=“1”>
<ino:current ino:position=“0” ino:quantity=“0” />
</ino:cursor>
- <ino:message ino:returnvalue=“8306”>
<ino:messagetext ino:code=“INOXIE8306”>Invalid cursor position</ino:messagetext>
</ino:message>
</ino:response>

see also
http://tamino.forums.softwareag.com/viewtopic.php?p=8191

I was read this topic earley but I want to query with X-Query. Is it possible? or I must do it with XQuery.
Thanks.

Hello

The object reference is on the ID attribute, so you would get the name elements of referenced nodes by

/order/customer/@ID/ID/name

Note that both, the node with object reference mapping and the implicit placeholder element (same name) must be specified in the path expression.

kind regards
Eric

OK. It works very fine.
Thanks, thanks, thanks.