rogalmic / vscode-xml-complete

XML editing helper (using XSD schemaLocation)
MIT License
28 stars 14 forks source link

Error fetching the schema file #20

Closed prof7bit closed 4 years ago

prof7bit commented 5 years ago

See attached screenshot. It shows two errors although the xsd file exists at this location. Itfails to download the schema and autocomplete will not work.

I have also attached a zip file containing the xml file causing the error.

xml-complete-xsd-error

IO-Link-01-DirectParamsDevice-20130515-IODD1.1.zip

rogalmic commented 5 years ago

Seems this xsd link does not work for me:

$ curl "http://www.io-link.com/IODD/2010/10 IODD1.1.xsd"
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://io-link.com/IODD/2010/10%20IODD1.1.xsd">here</a>.</p>
</body></html>
park.js:14 Mixed Content: The page at 'https://io-link.com/IODD/2010/10%20IODD1.1.xsd' was loaded over HTTPS, but requested an insecure script 'http://pagead2.googlesyndication.com/apps/domainpark/show_afd_ads.js'. This request has been blocked; the content must be served over HTTPS.
prof7bit commented 5 years ago

This is not a link, this is a tuple separated by whitespace. First element is namespace, second is schema file name.

It should probably implement some kind of heuristic to look for the schema file when the namespace lokks like a http URL.

rogalmic commented 5 years ago

OK, so the reason is obvious. Currently only absolute paths are supported.

prof7bit commented 5 years ago

Maybe categorize this as a feature request instead of a bug

rogalmic commented 5 years ago

Yes, and one bug needs fixing: https://docs.microsoft.com/en-us/previous-versions/dotnet/netframework-4.0/ms256139(v%3Dvs.100) vs https://docs.microsoft.com/en-us/previous-versions/dotnet/netframework-4.0/ms256100(v%3Dvs.100)

rogalmic commented 4 years ago

https://github.com/rogalmic/vscode-xml-complete/commit/2ab31350df3bd1c17bdc321db8fa08ecf850bd2c