I have an XSD file that I use to validate some XML data, and it works fine on my own PC. However, when on a computer without a network it does not work with this error
The server was unable to process the request. ---> The type ' http://schemas.microsoft.com/sqlserver/2004/sqltypes:nvarchar ' is not declared or is not a simple type.
But it works great elsewhere.
The beginning of my XSD file is as follows
<?xml version="1.0" encoding="utf-8"?> <xsd:schema xmlns:schema="DataLoad" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sqltypes="http://schemas.microsoft.com/sqlserver/2004/sqltypes" elementFormDefault="qualified"> <xsd:import namespace="http://schemas.microsoft.com/sqlserver/2004/sqltypes" schemaLocation="http://schemas.microsoft.com/sqlserver/2004/sqltypes/sqltypes.xsd" />
After some research, I tried changing the schemaLocation attribute to
schemaLocation="http://schemas.microsoft.com/sqlserver/2004/sqltypes ./bin/sqlTypes.xsd"
Apparently this should load from ./bin/sqlTypes.xsd then (I saved a local copy of MS one to ./bin/sqlTypes.xsd
But now I get this error ...
The server was unable to process the request. ---> Unable to load the schema from the location http://schemas.microsoft.com/sqlserver/2004/sqltypes ./bin/sqltypes.xsd '- the root XML element of W3C The schema must be and its namespace must be http: //www.w3.org/2001/XMLSchema '..
I am new to XML Schemas and still trying to think it over.
source share