Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old March 20th, 2007, 11:35 PM
Xh
Guest
 
Posts: n/a
Default registering new XSR object

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




  #2  
Old March 21st, 2007, 01:25 AM
Xh
Guest
 
Posts: n/a
Default Re: registering new XSR object

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

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,414 network members.