Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find XSD schema file #24

Closed
bammi opened this issue Jan 5, 2020 · 9 comments
Closed

Cannot find XSD schema file #24

bammi opened this issue Jan 5, 2020 · 9 comments

Comments

@bammi
Copy link

bammi commented Jan 5, 2020

In the attached example (.XML file) XML Complete always complains that it cannot find the XSD file. I have triple checked that the file exists at the specified location, and in fact if i open the sa,e XML file in Visual Studio it find the schema and does all the completions according to the schema correctly.
I tried both these syntaxes
xsi:noNamespaceSchemaLocation="file:///c:/Program Files/Memento/Memento Security/build.xsd"
and
xsi:noNamespaceSchemaLocation="c:\Program Files\Memento\Memento Security\build.xsd"

neither work (and they both work with Visual Studio).
xsd_error
xsd_error2

@rogalmic
Copy link
Owner

rogalmic commented Jan 5, 2020

Can you try to url encode the file location, ie. change spaces to %20 ?

xsi:noNamespaceSchemaLocation="file:///c:/Program%20Files/Memento/Memento Security/build.xsd"

@bammi
Copy link
Author

bammi commented Jan 6, 2020 via email

@rogalmic
Copy link
Owner

rogalmic commented Jan 6, 2020

Cannot see any screenshot, please add directly from github page.

@bammi
Copy link
Author

bammi commented Jan 6, 2020

Per request screenshot added
xsd_error_3

@bammi bammi closed this as completed Jan 6, 2020
@bammi bammi reopened this Jan 6, 2020
@rogalmic
Copy link
Owner

rogalmic commented Jan 6, 2020

Screenshot shows that XMLSchema.xsd was loaded. 'build.xsd' seems not found, please re-verify path if it does not contain any extra white space chars.

In case of problems please attach the xml and xsd files, so i can reproduce here.

@bammi
Copy link
Author

bammi commented Jan 7, 2020 via email

@rogalmic
Copy link
Owner

rogalmic commented Jan 7, 2020

You need to zip the files, then it will allow them AFAIK.

@bammi
Copy link
Author

bammi commented Jan 10, 2020

files.zip

Files added in the ZIP, the XML file and the XSD file

@rogalmic
Copy link
Owner

I found the issue in formatting, which is used for nicer "Go to definition" support.

The attribute values were not properly encoded, so :

<tag attr="&quot;" />

was changed to

<tag attr=""" />

which basically broke the xml.

Please update extension to v. 0.2.8 - it should fix this .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants