I'm having this problem with referencing my XML Schema in an XML file.
I have my XSD in this path:
C:\environment\workspace\maven-ws\ProjectXmlSchema\email.xsd
But when in my XML file I'm trying to locate the schema like this, the XSD is not found:
<?xml version="1.0" encoding="UTF-8" ?>
<email xmlns="http://www.w3schools.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3schools.com
file://C://environment//workspace//maven-ws//ProjextXmlSchema//email.xsd">
The only way the XSD is found is when it's in the same folder:
xsi:schemaLocation="http://www.w3schools.com email.xsd"
So the question is this: How does the path have to look so that the XSD will be found if the XML file wasn't in the same folder as the XSD file?
By the way, the example I've been using was from MSDN: they're claiming it's supposed to work the way I tried to. But it doesn't.
xsd
files through a localweb server
. Yes it does mention the idea of usingweb browser
to verify the local path. In my case, I did not only need to verify but, also instructeclipse
not to lookup spring repos and instead go to my local web server (if I remember correctly, file option did not work for me). – Fredrickafredrickson