redhat-developer / vscode-xml

Editing XML in Visual Studio Code made easy
Eclipse Public License 2.0
254 stars 78 forks source link

Schema catalog is not working on Windows 10 #937

Closed Cicorione closed 11 months ago

Cicorione commented 11 months ago

Dear All,

I believe I properly associated the schema I need in the preference:

xml-vscode1

however when I go working on the XML document, errors aren't find, if tags are in the wrong order this is not reported, tag auto-completion is missing.

[Trace - 9:42:03 AM] Sending request 'initialize - (0)'.
[Trace - 9:42:04 AM] Received notification 'window/logMessage'.
[Info  - 9:42:04 AM] Oct 10, 2023 09:42:03 org.eclipse.lemminx.XMLLanguageServer initialize()
Message: Initializing XML Language server
LemMinX Server info:
 - Version : 0.26.1
 - Java : C:\Program Files\Microsoft\jdk-17.0.7.7-hotspot
 - VM Version : 17.0.7
 - Git 8379294 - [maven-release-plugin] prepare release 0.26.1
[...]
[Info  - 9:42:04 AM] Oct 10, 2023 09:42:04 org.eclipse.lemminx.extensions.contentmodel.uriresolver.XMLCatalogResolverExtension setCatalogs()
Message: Adding XML catalog 'C:\\Users\\MY-USER\\Documents\\Speedata\\catalog-schema-en.xml' with expand system id 'file:///C://Users//MY-USER//Documents//Speedata//catalog-schema-en.xml' and root URI 'file:///x%3A/Marketing/New%20Catalogs/'.

But on the root tag I have this message:

xml-vscode

Below useful information about my environment:

About the plugin

XML v0.26.1

About Windows

Edition Windows 10 Pro
Version 22H2
Installed on    ‎5/‎16/‎2022
OS build    19045.3448
Experience  Windows Feature Experience Pack 1000.19044.1000.0

About VSCode

Version: 1.83.0 (user setup)
Commit: e7e037083ff4455cf320e344325dacb480062c3c
Date: 2023-10-03T16:12:16.321Z
Electron: 25.8.4
ElectronBuildId: 24154031
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.19045

I checked if multiple XML servers were running, but they are not, I have only one server run.

jps
19204 XMLServerLauncher
1448 Jps

Thank you! 🙏

angelozerr commented 11 months ago

Could you share your github project with your XSD, catalog XML file, etc and your vscode settings, thanks

Cicorione commented 11 months ago

Hi @angelozerr it is not a Github project, I can share a sample code and schema, but I don't know how to export vscode settings, let me see if searching on line I can find how do to that.

Cicorione commented 11 months ago

@angelozerr not sure what happened, but when I created a new file to reproduce the issue automagically schemas started to be associated although I asked for the .XML file while the VSCODE-XML is using the .XSD one. I am going to take some days more to see if the issue starts again, thanks.

angelozerr commented 11 months ago

Lets give up the vscode settings but please share your xml catalog xml files and xsd

Cicorione commented 11 months ago

@angelozerr

I reproduced the problem and it was totally my fault and huge PEBCAK as usual... 🤦

I've never took the initiative to open schema file, and I just followed the instruction provided by the software so I simply copied a file from a position to another.

It results the file I was copying is recalling the .XSD file:

<?xml version="1.0" encoding="UTF-8"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
    <!-- W3C schema -->
    <uri name="urn:speedata.de:2009/publisher/en" uri="layoutschema-en.xsd"/>
</catalog>

And today is happened that instead of copy only the file called layout-schema-en.xml I copied all the files, including layoutschema-en.xsd and automagically everything started to work as it should be.

🤦

angelozerr commented 11 months ago

@Cicorione if I understand you resolved your problem?

Cicorione commented 11 months ago

Yes I did.

angelozerr commented 11 months ago

Glad you fixed your issue and I hope you will enjoy with vscode-xml.

I close the issue