I have an xsd. When I try to validate it in BizTalk it gives these errors:
error BEC2009: Node "<Schema>" - Schema reference "http://www.w3.org/2001/xml.xsd" is not a valid reference or does not exist in the current project. error BEC2009: Node "<Schema>" - Schema reference "http://www.w3.org/2001/xml.xsd" is not a valid reference or does not exist in the current project. warning BEC999: Cannot resolve the 'schemaLocation' attribute. error BEC3001: The 'http://www.w3.org/XML/1998/namespace:space' attribute is not declared. warning BEC999: Cannot resolve the 'schemaLocation' attribute. warning BEC1007: Node "<Schema>" - Target namespace is empty.
I think it is referring to the namespaces which look like this:
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
Not sure if that is enough information to go on…
I found that depending on what program I use to validate xml with it sometimes works. For example. If I create some .net code to validate an xml against the schema it seems to read the xsd ok and validates the xml. If I use the xml validation in notepad++ it says it cannot read the schema though. In another mapper (WTX) they say it also does not work.
Are there other things I can try to narrow down possible issues?
Thanks to xcut. Found that if I download the schema locally and put it in the BizTalk project the schema validates ok, but with 1 warning:
warning BEC1007: Node "" – Target namespace is empty.
Apart from it being a bit strange to import the namespace schema, it may be that BizTalk simply cannot import a schema through a URL (whereas your .net code can).
To exclude this as an issue, download the schema from w3.org, put it in your project and import it from there instead of over http.