Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.
Hi, Forum:I successfully created my second Database and loaded several(6) instances.Being happy with that, I’ve been trying to query the database, but it doesn’t return right results that I expect.When I do this from TII XQuery,for $t in input()return $tit returns 6 objects in the format ofxq:result/xq:object/TLTransactionBUT, when I try this,for $t in input()return $t/ TLTransaction:cool:it throws “8306:Invalid cursor position”.Similar query works for the other database.The only difference(that I can think of) of the “TLTransaction” Database is that it imports two other schemas(XMLSignature and XMLEncryption). I had defined both “Signature.tsd” and “Encryption.tsd” before I defined “TLTransaction.tsd”.Here’s the beginning of my schema.<?xml version="1.0" encoding="UTF-8"?><xs:schema targetNamespace=“http://www.myCompany.com” xmlns:xs=“XML Schema” xmlns:tsd=“http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition” xmlns:ds=“XML-Signature Syntax and Processing” xmlns:xenc=“XML Encryption Syntax and Processing” xmlns:tl=“http://www.myCompany.com” elementFormDefault=“qualified”> xs:annotation xs:appinfo <tsd:schemaInfo name=“TLTransaction”> <tsd:collection name=“TxnCollection”/> <tsd:doctype name=“tl:TLTransaction”> tsd:logical tsd:contentclosed</tsd:content> </tsd:logical> </tsd:doctype> </tsd:schemaInfo> </xs:appinfo> </xs:annotation> <xs:import namespace=“XML-Signature Syntax and Processing” schemaLocation=“Signature”/> <xs:import namespace=“XML Encryption Syntax and Processing” schemaLocation=“EncryptedData”/> <xs:element name=“TLTransaction”> xs:complexType xs:sequence <xs:element name=“Header” type=“tl:TransactionHeaderType”/> <xs:element name=“Body” type=“tl:TransactionBodyType”/> </xs:sequence> </xs:complexType> </xs:element>…Can somebody help with this?Scott Chung
Never mind I self-solved this by declaring namespace like this.-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-declare namespace tl= “http://www.myCompany.com”for $q in input()/tl:TLTransactionreturn $q-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-Hmmm… so if there are several namespaces, we have to declare them when we query. I see.Well…I am learning.Scott