# Validation using schema with imports

**URL:** <https://techcommunity.softwareag.com/t/validation-using-schema-with-imports/58683>\
**Category:** Forum\
**Tags:** Former-Crossvision-Products, Service-Orchestrator\
**Created:** [November 25, 2004, 10:50am UTC](https://techcommunity.softwareag.com/t/validation-using-schema-with-imports/58683 "2004-11-25T10:50:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jampac](https://avatars.discourse-cdn.com/v4/letter/j/90db22/32.png) [@jampac](https://techcommunity.softwareag.com/u/jampac)\
**Post date:** [November 25, 2004, 10:50am UTC](https://techcommunity.softwareag.com/t/validation-using-schema-with-imports/58683/1 "2004-11-25T10:50:06Z")

</div>

Hi,  
for a proof-of-concept (simple ebXML message handler with SOAP, ebXML and payload validation) we tried to validate an ebXML header document using the schema “msg-header-2\_0.xsd”. This schema imports 4 other schemas. It seems that the Mediator Xalan implementation doesn’t resolve the imports - or there is something wrong with the validator step (I supplied the target NS and schema location). The zip file contains all file to reproduce the problem. Any idea?   
  
I am using Mediator 7.3.1.1 on WinXP with Tomcat/5.0.28 and j2sdk1.4.2\_04  
  
mja  
[schema-ebXML.zip](https://techcommunity.softwareag.com/uploads/short-url/3zfGydAo1VoJT3umeQSbPos2rfG.zip) (9.18 KB)

---

<div class="post-metadata">

**Author:** ![Mike\_Bernat](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Mike\_Bernat](https://techcommunity.softwareag.com/u/Mike_Bernat)\
**Post date:** [November 29, 2004, 10:25pm UTC](https://techcommunity.softwareag.com/t/validation-using-schema-with-imports/58683/2 "2004-11-29T22:25:47Z")

</div>

Hi Jampac,  
  
I have tried to reproduce your problem using the files you provided but I cannot make them work without modification. I am making an azssumption that the file “PersonelAndTravel…” is the intended payload, but this is not a valid XML document, as the “soap” namespace is not declared. When I correct this, I receive a validation error about “xml:lang” but nothing to indicate that there are any problems accessing the other imported schema.  
  
Can you provide any more information about the specific error(s) you are seeing?  
  
Best regards,  
 Mike

---

<div class="post-metadata">

**Author:** ![Mike\_Bernat](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Mike\_Bernat](https://techcommunity.softwareag.com/u/Mike_Bernat)\
**Post date:** [November 29, 2004, 11:04pm UTC](https://techcommunity.softwareag.com/t/validation-using-schema-with-imports/58683/3 "2004-11-29T23:04:03Z")

</div>

Hi Jampac,  
  
You created a private copy of xml.xsd, but you did not also create a private copy of XMLSchema.dtd, which is used by xml.xsd, and a private copy of datatypes.dtd, which is used by XMLSchema.dtd. When I added copies of both those file to the same location as the others, the validation worked OK.  
  
Best regards,  
 Mike

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:39pm UTC](https://techcommunity.softwareag.com/t/validation-using-schema-with-imports/58683/4 "2021-04-02T14:39:24Z")

</div>


