By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,558 Members | 1,060 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,558 IT Pros & Developers. It's quick & easy.

registering new XSR object

P: n/a
Xh
Hi all,

I have problem with registering multi XML Schemas

Based on:
http://publib.boulder.ibm.com/infoce...c/r0022716.htm

My commands are:

REGISTER XMLSCHEMA 'http://test/patient'
FROM 'file:///H:/ibm/workspace/TestEngine/patient.xsd'
AS Administrator.PATIENT

the above runs without error

I can see (in Control Center) new registered XSR with non-complete
(temporary) status

then I add the address schema with this command

ADD XMLSCHEMA DOCUMENT TO Administrator.PATIENT
ADD 'http://test/address'
FROM 'file:///H:/ibm/workspace/TestEngine/address.xsd'
COMPLETE

this returns an error: SQL20329N

cannot find "NAMESPACE" declared as "tnsa"

my XSD files are valid, the same error I receive when deploying XSD
with DB2 Developer
Workbench

and now how my XSD files look like:
patient.xsd:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://test/patient" xmlns:tns="http://test/patient"
xmlns:tnsa="http://test/address">
<xs:import namespace="tnsa" schemaLocation="address.xsd"/>
<xs:element name="patient" type="tns:patientType"/>
<!-- and so on.... -->
</xs:schema>

my address.xsd:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://test/address" xmlns:tns="http://test/address">
<xs:element name="postalCode" type="tns:postalCodeType"/>
<!-- and so on.... -->
</xs:schema>
I'd appreciate any help on working multi XML Schemas out.

thanks in advance

best regards
Łukasz

Mar 20 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Xh
Hi,

Maybe someone will need this.

I found the solution, based on: http://www.xfront.com/ZeroOneOrManyNamespaces.html

(the Heterogeneous Namespace Design section)

the truth is that DB2 Developer Workbench can not validate XSD files
because external namespaces are not imported

but it works ;)

I can register them without any errors

best regards
Łukasz

Mar 21 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.