Search code examples
xmlxsd

Why can't I reference XMLSchema as https?


Trying to work around a restriction that is beyond my control. We need to do schema validation as part of our work but nothing in the system is allowed to access http only https. I tried changing the schema xmlns to be https in XMLSpy but that doesn't validate despite me being able to see it in a browser when I go to https://www.w3.org/2001/XMLSchema

I want to do this:

<xs:schema xmlns:xs="https://www.w3.org/2001/XMLSchema">

-- schema stuff --

</xs:schema>

Instead of this:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

-- schema stuff --

</xs:schema>

Any help would be appreciated.


Solution

  • This is a namespace URI, not a URL. No-one ever fetches anything at that location. The namespace is defined in the specs as http://www.w3.org/2001/XMLSchema and you can't change it. If someone is reporting a security problem with this, they are mistaken and need to refine their rules.