cancel
Showing results for 
Search instead for 
Did you mean: 

error while creating xsd

Former Member
0 Kudos

Hi Experts,

I am preparing one XSD with two namespaces but it's throwing following error:

My xsd is looks like following:

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

<sh:schema xmlns:sh="http://www.w3.org/2001/XMLSchema" xmlns:eanucc="urn:ean.ucc:2">

<sh:element name="StandardBusinessDocument">

</sh:element>

<eanucc:element name="Message">

</eanucc:element>

</sh:schema>

Error: Element <eanucc:element> is not allowed under element <sh:schema>

Please let me know how do I correct this error.

Thanks-

Rams.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member200962
Active Contributor
0 Kudos

If I am not wrong only sh will be allowed as a prefix....may be you can cross-check by changing eanucc with sh

Former Member
0 Kudos

Thanks Salvi,

I am getting my XML file like following:

<sh:StandardBusinessDocument>

<eanucc:message>

</eanucc:message>

</sh:StandardBusinessDocument>

This is the reason I am preparing my XSD with two namespaces.

stefan_grube
Active Contributor
0 Kudos

> This is the reason I am preparing my XSD with two namespaces

You have to distinguish between namespace ot target structure and the namespace of XSD itself.

http://www.w3.org/TR/xmlschema-0/#UnqualLocals