cancel
Showing results for 
Search instead for 
Did you mean: 

refrencing 1 xsd to another

former_member193376
Active Contributor
0 Kudos

Hi

I have to import this XYZ.xsd as an External definations. Importing it is no problem, but this XYZ.xsd has some references of another ABC.xsd file which is another separted xsd file.

This is the <xs:include schemaLocation="ABC.xsd"/>. where it is calling or referencing the 2nd xsd(ABC.xsd).

So the question is, how do i link both the xsds, i am using pi 7.1

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

<xs:schema targetNamespace="http://www.ABC.org/Retail-EDI/Vocabulary/2003-10-16" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:pcats="http://www.ABC.org/Retail-EDI/Vocabulary/2003-10-16">

<xs:include schemaLocation="ABC.xsd"/>

<xs:element name="ABC-Acknowledgment">

<xs:complexType>

<xs:sequence>

<xs:element ref="pcats:field1"/>

<xs:element ref="pcats:field2"/>

<xs:element ref="pcats:field3" minOccurs="0" maxOccurs="unbounded"/>

</xs:sequence>

<xs:attribute name="version" type="xs:string" fixed="1.5"/>

</xs:complexType>

</xs:element>

<xs:element name="RejectedElement">

<xs:complexType>

<xs:sequence maxOccurs="unbounded">

<xs:element ref="pcats:field1"/>

<xs:element ref="pcats:field2"/>

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:schema>

Thanks

SG

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Make sure you fill the field 'Source' with ABC.xsd in the imported object for ABC.xsd.

Kind regards,

Koen

Answers (5)

Answers (5)

former_member193376
Active Contributor
0 Kudos

Thanks guys,

Actually, ABC.xsd had some more references and until and unless i did not import these other xsd's, the XYZ.xsd had a problem.

Saiyog

Former Member
0 Kudos

Then while importimg XYZ.xsd , in external definition specify file in File field, copy the same thing in Source

Then ABC.xsd will appear in external references

Do the same thing for ABC.xsd, specify source here as well

markangelo_dihiansan
Active Contributor
0 Kudos

Hi SG,

I'm not sure what 7.1 looks like, but this may help:

In XI 3.0, there is a tab there called External References. You will see there a Source and a Name. When you click the Name, click Copy Object. Then you open the target object and paste it under the Source located just before the tabs.

The Name you see in the External References are the ones that are declared as include or import in the XSD.

Hope this helps,

JoelTrinidade
Active Contributor
0 Kudos

Hi Saiyog,

The answer to your question lies in

"WSDL, XSD, and DTD documents can all reference each other. The Integration Builder recognizes these references automatically if you specify the source for each imported document. An example of such a reference is a URL that is referenced by other documents. The External References tab page lists the references found in the document and marks the referenced documents that have been imported to the Integration Repository. It is only possible to reference external definitions with the same namespace."

Rgds

joel

prateek
Active Contributor
0 Kudos

The linking is done using the "include" tag. Just make sure you import the ABC.xsd first and then XYZ.xsd. Also, after importing check "External Reference" tab under external definition whether you could see ABC.xsd or not.

Regards,

Prateek