I need to be able to validate an XML file against an XSD even when there is no Internet connection. My XML file correctly access the XSD and validates (or not) per the contents of the XSD when I access the XS namespace via the usual URL as below:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
However, I get error messages (Incorrect definition for the root element in schema" when I try to access a local version of XMLSchema. I downloaded the file from the website per the usual instructions for doing so and saved it as schema2.xsd. I verified that the file URI in the code below works properly by pasting the URI into my browser and the contents of the file loaded as expected. Everything else in my code is identical regardless of whether I try to access XMLSchema with the URL or the File URI (except of course for the one line of code in question).
<xs:schema xmlns:xs="file:///C:/delphi studies/schema/schema2.xsd" elementFormDefault="qualified">
I am sure there must be an easy way to do this, but I just can't get it right despite a lot of googling and experimentation.