The matching wildcard is strict, but no declaration can be found

I’ve just painfully bruised my brain against this error message when trying to validate an xml against its schema.

The problem is that it is hiding what is really going on, which is that it could not match the namespace uri in the schema document to the one in my xml document.

The xml:

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"
      xmlns:h="http://some.custom.schema">

    <title>/v2/people/facebook.com/@self</title>
    <updated>2003-12-13T18:30:02Z</updated>

    <h:callId>b702ae86-b07f-4e2f-b49f-27d1a79b7783</h>
</feed>

The xsd

<xs:schema elementFormDefault="qualified"
                      targetNamespace="http://some.target.namespace.which.does.not.match"
                      xmlns="http://some.target.namespace.which.does.not.match"
                      xmlns:xs="http://www.w3.org/2001/XMLSchema">
</xs>

Check it.

  • Share/Bookmark