cancel
Showing results for 
Search instead for 
Did you mean: 

Import XSD in XI 3.0 - How to?

Former Member
0 Kudos

Hi

I have a question regarding import of an XSD in XI 3.0. The case is that I would like to import an XSD as an "External Definition" but the XSD has references to other XSD's and when I import the top level XSD, XI ignores the references and makes the "External Definition" useless.

Do I have to build my own XSD by copping parts from all the XSD's involved in defining the XML structure or is there away to do this in XI that I have not yet seen?

I tried to import the structure into XMLSPY and it worked beautifully. There I am able to drill down the different levels of the XML structure and to see data element definitions. Should XI not work the same way?

The top level XSD is located at: http://rep.oio.dk/ubl/xml/schemas/0p71/pie/pieLax.xsd

Regards

Christian

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Christian,

the Integration Repository is able to deal with schemas distributed over several files. You do not have to join them manually to one big file. However, you have to load each of them as an External Definition.

The Integration Repository then will be able to glue the documents together if you have maintained the 'source'-field of the External Definitions (and put everything in one namespace).

In your example you would not only need to define an External Definition representing the url you mentioned but one more where you load up the document found at http://rep.oio.dk/ubl/xml/schemas/0p71/maindoc/Invoice.xsd

Moreover, you have to enter this url as 'source' of the second External Definition. As this document again seems to refer other documents you will also have to define External Definitions for them.

I think this is also described in the Online-Help for External Definitions.

Greetings

Stephan

Former Member
0 Kudos

Hi Stephan

Thank you for your answer. We have followed your instructions but did only get half a success. Here is what we have done:

1) Created "External Definitions" for all related xsd-files with the same name as the xsd-filename and in our own namespace. Our namespace is different from those specified in the xsd-files. We have not change the namespaces in the xsd-files.

2) Maintained the "source"-field with the name for the xsd-file and not the url as specified in our answer. When we used the filename only we got a value the field "name" in the "External References".

3) We made a message mapping and imported the "top-level-xsd-element" from the "External Definition". This resulted in only the top level element and nothing else. What we expected was the possibility to drill down through the complete structure.

What did we doe wrong? Perhaps I could talk you into spending 10 min. and try it your self? This url leads to a zip file with all the related xsd files: http://rep.oio.dk/ubl/xml/schemas/0p71/documentation/resources.html

Do you know if it will be possible to make references across namespaces in a later version of XI?

Regards

Christian

Former Member
0 Kudos

Hi Christian,

I assume that you have tried to use the element 'Invoice' in namespacehttp://rep.oio.dk/ubl/xml/schemas/0p71/maindoc/.

This is based on the type 'InvoiceType' which is a complexType defined as a restriction of another type. This xsd-schema construct is currently not supported. As a workaround I recommend to delete the two tags <complexContent> and <restriction> in the schema.

I did not look through the schemas, so there may be more constructs that are currently not supported.

It is planned to extend the capabilities of schema understanding in the future, but I am not in the position to make any announcements here.

Regarding namespaces: The namespace of the External Definition is totally independent from the namespace of the documents imported. It is just a mean to provide uniqueness of names of repository objects. For External Definitions it also serves as boundary for the visibility of this special linking mechanism via the source-field. As far as I know there are no plans to change this.

Indeed, I see no urgent need for this, as you can upload documents from different namespaces as External Definitions in one repository namespace.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You should try to import the root node level XSD and not the top level XSD..check in your XMLSPY which is your root node and click on that when you try to import into XI..It works beautifully....

Hope it helps..

-Teresa