SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: warnerrs on August 14, 2014, 08:01:40 pm

Title: XML Validation and schemaLocation
Post by: warnerrs on August 14, 2014, 08:01:40 pm
Imported an xsd into a project and got this warning:
Quote
Error processing DTD 'http://www.w3.org/2001/XMLSchema'. URL status condition - HTTP/1.1 503 Service Unavailable.

So I thought I'd add a schemaLocation for it:
Code: [Select]
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd"

Now I get:
Quote
Error processing DTD 'http://www.w3.org/2001/XMLSchema.xsd'. URL status condition - HTTP/1.1 503 Service Unavailable.

So it seems slick interpreted my schemaLocation correctly, but still couldn't fetch it.

So I tried using a URL mapping in Options->Network & Internet Options->URL Mappings instead. Got the same message.

Seems broke.
Title: Re: XML Validation and schemaLocation
Post by: Clark on August 20, 2014, 07:45:16 pm
There seem to be two problems. The first problem has to do with resolving the location of an external entity. The second problem is that some newer schema elements are not supported by Xerces-C++ 3.1.1. We can fix the first problem easily. The second problem is much more tricky. We will investigate this.
Title: Re: XML Validation and schemaLocation
Post by: warnerrs on August 20, 2014, 10:07:39 pm
Thanks.

Also, any chance that xml_validate will add validation for schemas with key, keyref, and unique constraints? xmllint supports it. Maybe a change to libxml2 is in order?
Title: Re: XML Validation and schemaLocation
Post by: Clark on August 21, 2014, 09:59:07 am
We tried to switch to libxml2 a while ago because xerces is slow but it was unstable and caused SlickEdit to crash so we dumped it. Maybe they've fixed the problems. Also, I don't know if libxml2 can handle these new schema enhancements.

When I run the Xerces command line tool (StdInParse -s -n ), it fails like SlickEdit does on the schema above (after fixing the file not found problem).

We'll have to look into this more.