Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - cannot validate xml with remote schema [Thread Next] Re: cannot validate xml with remote schemaTo: SINGH Navpreet <Navpreet.SINGH@-----.---> Date: 9/14/2007 9:08:00 PM
One schema defines the elements in no namespace and the other in the
http://a995760/pub/Resources/Validation namespace. In any case the local
elements are in no namespace thus the remote schema validates something
like:
<?xml version="1.0" encoding="UTF-8"?>
<loadInstructions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://a995760/pub/Resources/Validation"
xsi:schemaLocation="http://a995760/pub/Resources/Validation
test.xsd">
<test xmlns="">test</test>
<test1 xmlns="">3</test1>
</loadInstructions>
To have the local elements in the remote schema defined in the same
namespace as the global element you need something like below:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://a995760/pub/Resources/Validation"
elementFormDefault="qualified">
<xs:element name="loadInstructions">
<xs:complexType>
<xs:sequence>
<xs:element name="test"
type="xs:string"/>
<xs:element name="test1"
type="xs:integer"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina - http://aboutxml.blogspot.com/
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
www.---.com
From studt@f... Fri Sep 14 23:42:55 2007
Received: from wigg | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
