Create an XML document for students for library.

QuestionsCreate an XML document for students for library.
akankshat.ngPublished on: 4/25/2024 10:52:50 AM

Create an XML document for students for library.


1 Answers
Best Answer 0
Akanksha Tripathi 10/16/2018 1:24:00 AM

Procedure

1. Start theIBM� InfoSphere™ DataStage� and QualityStage™ Designer.

2. ChooseImport>Schema Library Manager.

3. On the Libraries tab, clickNew Library.

4. In the New Contract Library window, enter Example_library for the name of the library.

5. ClickOKto save the library.

6. Select the library that you created, Example_library, and then clickImport New Resourcefrom theResource View.

7. Select the schema,department.xsd.

8. The File Upload Complete window is displayed.

9. ClickOK.

The library is not valid and the error message,"One or more resources failed validation. Click Validate to view the errors"is displayed.

10. ClickValidateto view the actual error.Following figure shows the error.

The error indicates that the schemadepartment.xsdhas a dependency on another schema,definition.xsd. The schemadepartment.xsdcontains an element named dept_id that has the type dept_id1. Because the type dept_id1 is defined in the schemadefinition.xsd, you need to import it, too.

Importdefinition.xsdand clickValidate. The error still exists because the file location fordefinition.xsdis incorrect.

Perform the following steps to specify the file location:

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

<xs:schema xmlns="http://www.ibm.com/departments"

xmlns:xs="http://www.w3.org/2001/XMLSchema"

targetNamespace="http://www.ibm.com/departments">

<xs:include schemaLocation="http://ibm.com/definitions/definition.xsd"/>

<xs:element name="Info">

<xs:complexType>

<xs:sequence>

<xs:element name="dept_id" type="dept_id1"/>

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:schema>

13. location below in theFile Location

Click on any other field to refresh the view.The error gets resolved and the library becomes valid.

14. ClickOKto close the Libraries window.