X-Query and Object Reference

Hi there,

still not giving up I got another problem related to my previous 2 recent posts. :rolleyes:

I implemented an example with 2 Schemas, one Main Schema and one that is referenced from the main schema (I will attach schema’s below).

Now I want to do a X-Query search on everything in the main schema including the dereferenced Referenz Schema. :smiley:

If I do a Query like: “/mainSchema” I just see the Reference to the ReferenzSchema but not its contents. If I do a query like:

"/mainSchema[@ID=“xy] | /mainSchema/refSchema/refSchema…”

does not get what I hope for either. :frowning:

Can someone please help me here, this is a deadlock question for me rigth now :frowning:



Main Schema:

<?xml version = "1.0" encoding = "UTF-8"?>
<xs:schema xmlns:xs = “http://www.w3.org/2001/XMLSchema” xmlns:tsd = “http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition”>
xs:annotation
xs:appinfo
<tsd:schemaInfo name = “BankingMetaSchema”>
<tsd:collection name = “claudia”></tsd:collection>
<tsd:doctype name = “doxBankingDoc”>
tsd:logical
tsd:contentclosed</tsd:content>
</tsd:logical>
</tsd:doctype>
</tsd:schemaInfo>
</xs:appinfo>
</xs:annotation>
<xs:element name = “doxBankingDoc”>
xs:complexType
xs:sequence
<xs:element name = “doxElements”>
xs:complexType
xs:sequence
<xs:element name = “self”>
xs:complexType
xs:sequence
<xs:element ref = “doxId”></xs:element>
<xs:element ref = “ownerId”></xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name = “originator”>
xs:complexType
xs:sequence
<xs:element ref = “doxId”></xs:element>
<xs:element ref = “ownerId”></xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name = “creationDate” type = “xs:dateTime”></xs:element>
<xs:element name = “archivingDate” type = “xs:string”></xs:element>
<xs:element name = “keepingTime” type = “xs:boolean”></xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name = “doxDocElements”>
xs:complexType
xs:sequence
<xs:element name = “language” type = “xs:string”></xs:element>
<xs:element name = “docFormat” type = “xs:string”></xs:element>
<xs:element name = “docType” type = “xs:string”></xs:element>
<xs:element name = “docTypeKey” type = “xs:string”></xs:element>
<xs:element name = “docTypeVersion”>
xs:complexType
xs:sequence
<xs:element name = “major” type = “xs:boolean”></xs:element>
<xs:element name = “minor” type = “xs:boolean”></xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name = “docLoc” type = “xs:string”></xs:element>
<xs:element name = “timeStamp”>
xs:complexType
xs:sequence
<xs:element name = “tsVersion” type = “xs:boolean”></xs:element>
<xs:element name = “tsType” type = “xs:string”></xs:element>
<xs:element name = “digestAlg” type = “xs:string”></xs:element>
<xs:element name = “tsData” type = “xs:string”></xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name = “doxEncryptedDocElements”>
xs:complexType
xs:sequence
<xs:element name = “size” type = “xs:short”></xs:element>
<xs:element name = “keyInfo”>
xs:complexType
xs:sequence
<xs:element ref = “ownerId”></xs:element>
<xs:element name = “keyNum” type = “xs:boolean”></xs:element>
<xs:element name = “version” type = “xs:boolean”></xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name = “doxBankingDocElements”>
xs:complexType
xs:sequence
<xs:element name = “accountNum” type = “xs:long”></xs:element>
<xs:element name = “bankCode” type = “xs:int”></xs:element>
<xs:element name = “accountType” type = “xs:string”></xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name = “doxAppDocElements” type = “xs:NMTOKEN”>
xs:annotation
xs:appinfo
tsd:elementInfo
tsd:physical
tsd:native
tsd:index
tsd:standard</tsd:standard>
</tsd:index>
tsd:objectRef
tsd:collectionRefclaudia</tsd:collectionRef>
tsd:dereference</tsd:dereference>
<tsd:accessPredicate operator = “=”>
tsd:nodeRef/doxAppDocElements/@ID</tsd:nodeRef>
</tsd:accessPredicate>
</tsd:objectRef>
</tsd:native>
</tsd:physical>
</tsd:elementInfo>
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name = “doxId”>
xs:simpleType
<xs:restriction base = “xs:string”>
<xs:enumeration value = “9d4794842e-0015-5246-00105a3aa3af”></xs:enumeration>
<xs:enumeration value = “e56aeb761e-0010-9387”></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name = “ownerId”>
xs:simpleType
<xs:restriction base = “xs:string”>
<xs:enumeration value = “00000000000-0000-0000-0001020ff2cf”></xs:enumeration>
<xs:enumeration value = “e55b4c84ed-0001-0608-000102d97f08”></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:schema>



Referenz Schema:

<?xml version = "1.0" encoding = "UTF-8"?>
<xs:schema xmlns:xs = “http://www.w3.org/2001/XMLSchema” xmlns:tsd = “http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition”>
xs:annotation
xs:appinfo
<tsd:schemaInfo name = “DoxAppDocSchema”>
<tsd:collection name = “claudia”></tsd:collection>
<tsd:doctype name = “doxAppDocElements”>
tsd:logical
tsd:contentclosed</tsd:content>
</tsd:logical>
tsd:physical</tsd:physical>
</tsd:doctype>
</tsd:schemaInfo>
</xs:appinfo>
</xs:annotation>
<xs:element name = “doxAppDocElements”>
xs:complexType
xs:sequence
<xs:element name = “isDeleted” type = “xs:boolean”></xs:element>
<xs:element name = “read” type = “xs:boolean”></xs:element>
<xs:element name = “numOfPages” type = “xs:byte”></xs:element>
<xs:element name = “uiParts”>
xs:complexType
xs:sequence
<xs:element name = “doxId” type = “xs:string”>
xs:annotation
xs:appinfo
tsd:elementInfo
tsd:physical
tsd:native
tsd:index
tsd:standard</tsd:standard>
</tsd:index>
</tsd:native>
</tsd:physical>
</tsd:elementInfo>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name = “ownerId” type = “xs:long”> </xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name = “ID” type = “xs:NMTOKEN”>
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>



Main Object Instance:

<?xml version="1.0" encoding="UTF-8"?>



e56aeb761e-0010-9387
e55b4c84ed-0001-0608-000102d97f08


9d4794842e-0015-5246-00105a3aa3af
00000000000-0000-0000-0001020ff2cf

2001-03-23T09:55:12
2001-03-23T10:55:27,98+01:00
0


de
text/xml
Kontoauszug
#DOCTYPEKEY#

1
0

000/00/00/00/e56aeb7696-0011-8883.xml

1
PKCS7
1.3.14.3.2.26
MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCEgUAMIAGCSqGSIb3DQEHAQAAMYIBSDCCAUQCAQEwQzA9MQswCQYDVQQGEwJERTEVMBMGA1UEChMMRC1UcnVzdCBHbWJIMRcwFQYDVQQDEw5ELVRydXN0IHRzcyBDQQICAvwwCQYFKw4DAhIFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTAxMDMyMzA5NTUyNlowIwYJKoZIhvcNAQkEMRYEFKeAsl+uawWADp8JTJ//8ZSufNEGMA0GCSqGSIb3DQEBAQUABIGAc6myCHmGH8W7TNdhb5M7ATP88EEHtwE+QNTltRIAsbW5N41nZlpeWM5XSpaq/ATe8BEJKxKqFi9n3HMkBdAS4XNd83xFVnfrtZT8cmMl8QCTxxqIEhc3UGggvIGPA2jsxQHcHlIlKYBdYvm/l2drl+VgFmkjQ0DPIEmPlEAxMwwAAAAAAAA=



5480

e55b4c84ed-0001-0608-000102d97f08
1
1



8124516291
7
Giro

id100




Referenz Object Instance:

<?xml version="1.0" encoding="UTF-8"?>

1
1
3

hvb_acc_statement_uiparts.xml
0010014673043906

Hi Alex,

You just need a “dummy” element which is used to populate the referenced schema when it is de-referenced.

I’m posting the modified doxBankingDoc instance.

Regards,
Puny

<?xml version="1.0" encoding="UTF-8"?>



e56aeb761e-0010-9387
e55b4c84ed-0001-0608-000102d97f08


9d4794842e-0015-5246-00105a3aa3af
00000000000-0000-0000-0001020ff2cf

2001-03-23T09:55:12
2001-03-23T10:55:27,98+01:00
0


de
text/xml
Kontoauszug
#DOCTYPEKEY#

1
0

000/00/00/00/e56aeb7696-0011-8883.xml

1
PKCS7
1.3.14.3.2.26
MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCEgUAMIAGCSqGSIb3DQEHAQAAMYIBSDCCAUQCAQEwQzA9MQswCQYDVQQGEwJERTEVMBMGA1UEChMMRC1UcnVzdCBHbWJIMRcwFQYDVQQDEw5ELVRydXN0IHRzcyBDQQICAvwwCQYFKw4DAhIFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTAxMDMyMzA5NTUyNlowIwYJKoZIhvcNAQkEMRYEFKeAsl+uawWADp8JTJ//8ZSufNEGMA0GCSqGSIb3DQEBAQUABIGAc6myCHmGH8W7TNdhb5M7ATP88EEHtwE+QNTltRIAsbW5N41nZlpeWM5XSpaq/ATe8BEJKxKqFi9n3HMkBdAS4XNd83xFVnfrtZT8cmMl8QCTxxqIEhc3UGggvIGPA2jsxQHcHlIlKYBdYvm/l2drl+VgFmkjQ0DPIEmPlEAxMwwAAAAAAAA=



5480

e55b4c84ed-0001-0608-000102d97f08
1
1



8124516291
7
Giro

id100

Hi there,

thanks for the tip, but I gave up on that before since I could not insert the instance of the doxBankingDoc when I made the change you suggested. I get:

Access Failure:
ReturnValue:8751
Code:INOXPE8751
MessageText:Storing an object of this mapping type is not permitted
MessageLine:Line 46, Column 26: Storing an object of this mapping type is not permitted

Any clue ?