  | |  | Components from namespace 'null ' | Components from namespace 'null ' 2003-12-04 - By Sunitha Muthireddy
I am trying to validate the my xml with external schema validation. My setting are : parser.setFeature("http://apache.org/xml/features/validation/schema", true);
parser.setProperty("http://apache.org/xml/properties/schema/external-schemaL ocation","IAR http://localhost:7001/IAR/Transaction.xsd");
My Schema is defined as :
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace="IAR" elementFormDefault="qualified"> <xs:element name="Transaction"> <xs:annotation>.
.
.
.
</xs:schema>
When I run I get this error message :
[Error] :1:86: src-resolve.4: Components from namespace 'null' are not referenceable from schema document 'http://localhost:7001/IAR/Transaction.xsd'.
[Error] :1:86: src-resolve.4: Components from namespace 'null' are not referenceable from schema document 'http://localhost:7001/IAR/Transaction.xsd'.
[Error] :1:86: src-resolve.4: Components from namespace 'null' are not referenceable from schema document 'http://localhost:7001/IAR/Transaction.xsd'.
[Error] :1:86: src-resolve.4: Components from namespace 'null' are not referenceable from schema document 'http://localhost:7001/IAR/Transaction.xsd'.
[Error] :1:86: src-resolve.4: Components from namespace 'null' are not referenceable from schema document 'http://localhost:7001/IAR/Transaction.xsd'.
[Error] :1:86: src-resolve.4: Components from namespace 'null' are not referenceable from schema document 'http://localhost:7001/IAR/Transaction.xsd'.
[Error] :1:86: src-resolve.4: Components from namespace 'null' are not referenceable from schema document 'http://localhost:7001/IAR/Transaction.xsd'.
[Error] :1:86: src-resolve.4: Components from namespace 'null' are not referenceable from schema document 'http://localhost:7001/IAR/Transaction.xsd'.
[Error] :1:86: src-resolve.4: Components from namespace 'null' are not referenceable from schema document 'http://localhost:7001/IAR/Transaction.xsd'.
[Error] :1:86: src-resolve.4: Components from namespace 'null' are not referenceable from schema document 'http://localhost:7001/IAR/Transaction.xsd'.
I get similar error when I run the sample Xerces files (personal.xml and personal.xsd) as input to my program.
What is that I am doing wrong?
Thanks
-Sunitha
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1264" name=GENERATOR></HEAD> <BODY> <DIV><FONT face=Arial size=2><SPAN class=453511118-04122003>I am trying to validate the my xml with external schema validation.</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=453511118-04122003></SPAN></FONT> </DIV> <DIV><FONT face=Arial size=2><SPAN class=453511118-04122003><STRONG>My setting</STRONG> are :</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=453511118-04122003></SPAN></FONT> </DIV> <DIV><FONT><SPAN class=453511118-04122003> <P><FONT size=2><FONT face=Arial>parser.setFeature(</FONT><FONT face=Arial> <FONT color=#2a00ff>"http://apache.org/xml/features/validation/schema"</FONT>, <B><FONT color=#7f0055>true</B></FONT></FONT></FONT><FONT face=Arial size=2>);</FONT></P> <P><FONT face=Arial size=2>parser.setProperty(<FONT color=#2a00ff>"http://apache.org/xml/properties/schema/external-schemaLocation" </FONT>,<FONT color=#2a00ff>"IAR http://localhost:7001/IAR/Transaction.xsd"</FONT>);</FONT></P> <P><SPAN class=453511118-04122003><FONT face=Arial size=2><STRONG>My Schema</STRONG> is defined as : </FONT></SPAN></P> <P><SPAN class=453511118-04122003><FONT face=Arial size=2><?xml version="1.0 " encoding="UTF-8"?><BR><xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace="IAR" elementFormDefault="qualified"><BR> <xs:element name="Transaction"><BR> <xs:annotation>.</FONT></SPAN></P> <P><SPAN class=453511118-04122003><FONT face=Arial size=2>.</FONT></SPAN></P> <P><SPAN class=453511118-04122003><FONT face=Arial size=2>.</FONT></SPAN></P> <P><SPAN class=453511118-04122003><FONT face=Arial size=2>.</FONT></SPAN></P> <P><SPAN class=453511118-04122003></SPAN><SPAN class=453511118-04122003><FONT face=Arial size=2></xs:schema></FONT></SPAN></P> <P><SPAN class=453511118-04122003><FONT face=Arial size=2>When I run I get this <STRONG>error message</STRONG> :</FONT></SPAN></P><SPAN class=453511118-04122003><FONT color=#ff0000> <P><FONT size=2>[Error] :1:86: src-resolve.4: Components from namespace 'null' are not referenceable from schema document 'http://localhost:7001/IAR/Transaction.xsd'.</FONT></P> <P><FONT size=2>[Error] :1:86: src-resolve.4: Components from namespace 'null' are not referenceable from schema document 'http://localhost:7001/IAR/Transaction.xsd'.</FONT></P> <P><FONT size=2>[Error] :1:86: src-resolve.4: Components from namespace 'null' are not referenceable from schema document 'http://localhost:7001/IAR/Transaction.xsd'.</FONT></P> <P><FONT size=2>[Error] :1:86: src-resolve.4: Components from namespace 'null' are not referenceable from schema document 'http://localhost:7001/IAR/Transaction.xsd'.</FONT></P> <P><FONT size=2>[Error] :1:86: src-resolve.4: Components from namespace 'null' are not referenceable from schema document 'http://localhost:7001/IAR/Transaction.xsd'.</FONT></P> <P><FONT size=2>[Error] :1:86: src-resolve.4: Components from namespace 'null' are not referenceable from schema document 'http://localhost:7001/IAR/Transaction.xsd'.</FONT></P> <P><FONT size=2>[Error] :1:86: src-resolve.4: Components from namespace 'null' are not referenceable from schema document 'http://localhost:7001/IAR/Transaction.xsd'.</FONT></P> <P><FONT size=2>[Error] :1:86: src-resolve.4: Components from namespace 'null' are not referenceable from schema document 'http://localhost:7001/IAR/Transaction.xsd'.</FONT></P> <P><FONT size=2>[Error] :1:86: src-resolve.4: Components from namespace 'null' are not referenceable from schema document 'http://localhost:7001/IAR/Transaction.xsd'.</FONT></P> <P><FONT size=2>[Error] :1:86: src-resolve.4: Components from namespace 'null' are not referenceable from schema document 'http://localhost:7001/IAR/Transaction.xsd'.</FONT></P> <P><SPAN class=453511118-04122003><FONT face=Arial color=#000000 size=2>I get similar error when I run the sample Xerces files (personal.xml and personal.xsd ) as input to my program.</FONT></SPAN></P> <P><SPAN class=453511118-04122003><FONT face=Arial color=#000000 size=2></FONT></SPAN> </P> <P><SPAN class=453511118-04122003><FONT face=Arial color=#000000 size=2>What is that I am doing wrong?</FONT></SPAN></P> <P><SPAN class=453511118-04122003><FONT face=Arial color=#000000 size=2></FONT></SPAN> </P> <P><SPAN class=453511118-04122003><FONT face=Arial color=#000000 size=2>Thanks</FONT></SPAN></P> <P><SPAN class=453511118-04122003><FONT face=Arial color=#000000 size=2>-Sunitha</FONT></SPAN></P></FONT></SPAN> <P><SPAN class=453511118-04122003><FONT face=Arial size=2></FONT></SPAN> </P></SPAN></FONT></DIV></BODY></HTML>
|
|
 |