Error with XSD

admin

Administrator
Staff member
The following is my XSD...

<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="GGProCfg" targetNamespace="a.xsd" elementFormDefault="qualified"
xmlns="a.xsd" xmlns:mstns="a.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="PROGRAM">
<xs:complexType>
<xs:sequence>
<xs:element name="Variables">
<xs:complexType>
<xs:sequence>
<xs:element name="JIWValue" />
</xs:sequence>
<xs:attribute name="Data" use="required" />
<xs:attribute name="Length" use="optional" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

And corresponsing XML as follows

<?xml version="1.0"?>
<PROGRAM xsi:schemaLocation="a.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<VARIABLES>
<JIWValue Data = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/">http://www.webdeveloper.com/forum/archive/index.php/</a><!-- m -->"0" Length = "3"/>
</VARIABLES>
</PROGRAM>


When i'm trying to validate it against the XSD it says PROGRAM,VARIABLES and JIWValue not declared in the XML... whats the Wrong with this..
 
Back
Top