I have a very simple xsd which defines an element "cache"
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsd:schema xmlns="http://mysite/schema/cache"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://mysite/schema/cache">
<xsd:complexType name="objectType" abstract="false">
<xsd:attribute name="target" type="xsd:string">
</xsd:attribute>
</xsd:complexType>
<xsd:complexType name="cacheType">
<xsd:sequence>
<xsd:element name="object" type="xsd:string" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:element name="cache" type="cacheType"></xsd:element>
</xsd:schema>
I have a spring config file with :
<?xml version="1.0" encoding="utf-8"?>
<objects xmlns="http://www.springframework.net"
xmlns:cache="http://mysite/schema/cache"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://mysite/schema/cache http://mysite/cache.xsd">
<description>
</description>
<cache:cache>
<cache:object target="site"/>
</cache:cache>
</objects>
During the call to
Spring.Objects.Factory.Xml.XmlObjectDefinitionReader.DoLoadObjectDefinitions at startup, I get the following error:
[XmlSchemaValidationException: The 'http://mysite/schema/cache:cache' element is not declared.]
This suggests that spring cant find my schema, but the xsd is available.
Any ideas why this isnt working?