I have a problem with my XML and XSD.
I'm trying to use the XHTML tag <img>
in my schema but I can't import the XHTML schema. The error that the validator is giving to me is:
Fatal error at line 0 column 0, unsupported protocol in URL.
The next is a minimal example that replicate my problem.
This is file.xsd:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<xsd:import namespace="http://www.w3.org/1999/xhtml"
schemaLocation="http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd" />
<xsd:element name="tag" >
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="xhtml:img" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
And this file.xml:
<?xml version="1.0" encoding="UTF-8"?>
<tag xmlns:xsi="w3.org/2001/XMLSchema- instance"
xmlns:xhtml="w3.org/1999/xhtml"; xsi:noNamespaceSchemaLocation="file.xsd">
<xhtml:img href="http://" />
</tag>