xsd

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

xml
xsd

Comments Off

Permalink

Output XSD Schema From XSLT Transformation

Well i needed to know how to generate a schema from XSLT which means you need to output the first line of the schema definition which wasnt too intuitive so here is the result:

hmmm – cant paste it in here – see attatched file!!

XSLT Transformation to Generate an XSD schema

Ok it was MUCH simpler than i thought of course! you simply type in the whole thing into the xslt and it just prints it out! so you dont need to use xs element at all doh!

Share

xml
xsd
xslt

Comments Off

Permalink