Re: [Moderator Action] validating an xml without internet connection

"Hans Hermawan" <hhermawa@students.wisc.edu> writes:

> 				   Hello...
> 
> 				       
> 
>  I am creating an XML Parser to parse an XML code and create a data structure
> 				   for it.
> 
> I used a schema to validate my XML. The schema is a .xsd file, and at the top
> 			of the schema there is a line
> 
> 				       
> 
> 	   xsd:schema xmlns:xsd="http://www.w3.org/1999/XMLSchema"
> 
> 	       then in my XML, I have this line at the very top
> 
> 	    xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> 	       xsi:noNamespaceSchemaLocation="D:\mySchema.xsd"
> 
> Looking at the code, I realized that somehow the schema need to connect to the
> 	     internet, go the specified url and validate my xml.
> 
> The problem is I need to be able to validate my schema without having to go to
>      the internet. Is there any way that I can validate my schema without
> 	     connecting to the internet? I tried to save the url
>  [[www.w3.org/1999/XMLSchema]] to my hard drive and calling that file at the
> 		 top line of my schema. But it doesn't work.

Sure, you can use xsi:schemaLocation _in your schema_ to provide a
pointer to a local copy of the schema for schema documents.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/

Received on Monday, 10 July 2000 05:04:53 UTC