rogalmic / vscode-xml-complete

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

Cannot find XSD schema file #24

Closed bammi closed 4 years ago

bammi commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

Thanks Michal, using %20 for spaces got me a step further in that it now does not complain about not being able to find the XSD file, but now it gives me a spurious error on a line that does not exist in my XSD or the XML file. See attached screenshot

tanks bammi

On Jan 6, 2020, at 2:09 AM, Michał notifications@github.com wrote:

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" — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rogalmic/vscode-xml-complete/issues/24?email_source=notifications&email_token=AAASXSZKB3SYLIM6QCRV6D3Q4JARVA5CNFSM4KCZYZ2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEID7AMY#issuecomment-570945587, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAASXSZDNVIX4RK5ZSJTA2LQ4JARVANCNFSM4KCZYZ2A.

rogalmic commented 4 years ago

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

bammi commented 4 years ago

Per request screenshot added xsd_error_3

rogalmic commented 4 years ago

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 commented 4 years ago

Hi Michal the silly fit thing does not let me attach xml or xsd files only picture format files. Please indicate an alternate email address to send you the files.

Cheers

Sent from my iPhone

On Jan 6, 2020, at 10:48 PM, Michał notifications@github.com wrote:

 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.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe.

rogalmic commented 4 years ago

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

bammi commented 4 years ago

files.zip

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

rogalmic commented 4 years ago

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 .