User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the XML, XSLT and XPATH section within the Software Development category of DaniWeb, a massive community of 456,577 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,636 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our XML, XSLT and XPATH advertiser: Programming Forums
Views: 6737 | Replies: 49
Reply
Join Date: Oct 2007
Posts: 12
Reputation: kzubair96 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
kzubair96 kzubair96 is offline Offline
Newbie Poster

Re: XML Schema/Relational Schema in DB29

  #21  
Nov 16th, 2007
do I have to register a XML schema in XSR before using it for validation?
Reply With Quote  
Join Date: Oct 2007
Posts: 76
Reputation: dilasing is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
dilasing dilasing is offline Offline
Junior Poster in Training

Re: XML Schema/Relational Schema in DB29

  #22  
Nov 18th, 2007
Yes, A XML schema has to be registered in XSR before it can be used for validation.
Reply With Quote  
Join Date: Oct 2007
Posts: 12
Reputation: kzubair96 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
kzubair96 kzubair96 is offline Offline
Newbie Poster

Re: XML Schema/Relational Schema in DB29

  #23  
Nov 19th, 2007
OK...
I want to register a XML schema in XSR. May I know how to do this?
Reply With Quote  
Join Date: Oct 2007
Posts: 76
Reputation: dilasing is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
dilasing dilasing is offline Offline
Junior Poster in Training

Re: XML Schema/Relational Schema in DB29

  #24  
Nov 21st, 2007
XML schema registration involves three steps. First you have to register the primary schema document. It can be done as given below:
Step1: REGISTER XMLSCHEMA http://test FROM /db2/samples/schema/test.xsd AS test.test1;

It will register the primary schema document test.xsd with the XSR. The fully-qualified name of the test.xsd schema is /db2/samples/schema/test.xsd. /db2/samples/schema directory is the local directory where the test.xsd schema document is stored on the system. The schema location is specified using the URL http://test. This XML schema is identified as test.test1.

If XML schema involves multiple schema documents, it can be added to the registered primary document as given below:
Step2: ADD XMLSCHEMA DOCUMENT TO test.test1 ADD header.xsd FROM /db2/samples/schema/header.xsd;

Finally registration process can be completed as given below:
Step3: COMPLETE XMLSCHEMA test.test1;
You can check http://www-128.ibm.com/developerwork...Validation.pdf for more information on this.
Reply With Quote  
Join Date: Oct 2007
Posts: 31
Reputation: ssahil11 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
ssahil11 ssahil11 is offline Offline
Light Poster

Re: XML Schema/Relational Schema in DB29

  #25  
Nov 21st, 2007
What is primary schema document?
Reply With Quote  
Join Date: Oct 2007
Posts: 76
Reputation: dilasing is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
dilasing dilasing is offline Offline
Junior Poster in Training

Re: XML Schema/Relational Schema in DB29

  #26  
Nov 22nd, 2007
An XML schema is a collection of one or more XML schema documents. Of this collection, one document must be designated as the primary schema document. The primary schema document is at the top of the hierarchy with respect to the import and includes dependencies. It includes and/or imports other documents in the schema, which might further include and/or import other schema documents.
Reply With Quote  
Join Date: Oct 2007
Posts: 31
Reputation: ssahil11 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
ssahil11 ssahil11 is offline Offline
Light Poster

Re: XML Schema/Relational Schema in DB29

  #27  
Nov 22nd, 2007
Please give more details about query given in Step 1 for registering primary schema document? I seem to have some problems there.
Reply With Quote  
Join Date: Oct 2007
Posts: 76
Reputation: dilasing is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
dilasing dilasing is offline Offline
Junior Poster in Training

Re: XML Schema/Relational Schema in DB29

  #28  
Nov 23rd, 2007
In order to register the document, the fully-qualified file name for the schema document is needed. Fully-qualified name means the file system path of where the document is stored. An SQL identifier also needs to be provided so that the XML schema can later be identified and used for validation. The user can choose any valid SQL two-part name to identify the XML schema. Using meaningful names that help in identifying the XML schema is recommended. Additional information like the schema location of the XML schema can also be provided during registration. Schema location is a URL that identifies and indicates where the schema document is located. You can check http://www.ibm.com/developerworks/db...m-0603saracco/ for more information on this.
Reply With Quote  
Join Date: Oct 2007
Posts: 21
Reputation: v.godhe is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
v.godhe v.godhe is offline Offline
Newbie Poster

Re: XML Schema/Relational Schema in DB29

  #29  
Nov 25th, 2007
Does DB2 validate the schema documents before registering it with XSR?
Reply With Quote  
Join Date: Oct 2007
Posts: 76
Reputation: dilasing is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
dilasing dilasing is offline Offline
Junior Poster in Training

Re: XML Schema/Relational Schema in DB29

  #30  
Nov 26th, 2007
The schema documents are analyzed and any mismatches between the schema locations provided in the 2nd step and schemaLocation values provided in the import and/or include tags in the schema documents are discovered. If the schema documents are not well-formed or there are schema location mismatches, an error is issued to the user and the schema does not get registered with the XSR.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb XML, XSLT and XPATH Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the XML, XSLT and XPATH Forum

All times are GMT -4. The time now is 6:17 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC