Daelian
Daelian

Reputation: 65

Using xsd.exe with www.w3.org/TR/xmlschema11-1/?

Is there a possibility to use the Visual Studio tool xsd.exe together with a xsd scheme using the www.w3.org/TR/xmlschema11-1/ namespace? When I'm trying this I always get an error message: Schema validation warning: The root element of a W3C XML schema must be and its namespace must be 'http://www.w3.org/2001/XMLSchema'. (Error message translated with deepl, the original error message is in German: Schemavalidierungswarnung: Das Stammelement eines W3C XML-Schemas muss und sein Namespace 'http://www.w3.org/2001/XMLSchema' lauten.) I'm using the version 4.7.3081.0 of xsd.exe.

Upvotes: 0

Views: 170

Answers (1)

Michael Kay
Michael Kay

Reputation: 163322

The error message means what it says. If it doesn't use the namespace http://www.w3.org/2001/XMLSchema then it's not an XSD schema.

The URI www.w3.org/TR/xmlschema11-1/ is the location of the XSD 1.1 specification. I don't know what made you think you could use it as a namespace.

The Microsoft XSD processor has not been upgraded to support XSD 1.1, and no amount of fiddling with namespaces will change that. The only XSD 1.1 processor I know of that runs on .NET is my own processor, Saxon.

Upvotes: 0

Related Questions