rogalmic / vscode-xml-complete

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

Support for relative paths #26

Closed kobiersky closed 3 years ago

kobiersky commented 3 years ago

For better usability in various projects where schema is stored locally a relative address supoport is need. Please try to add support for one of the following:

xml-model href="../../xsd/project.xsd" schematypens="http://www.w3.org/2001/XMLSchema"

or

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/project.xsd">

rogalmic commented 3 years ago

I made a small change that should enable this in case of noNamespaceSchemaLocation or schemaLocation: https://github.com/rogalmic/vscode-xml-complete/commit/789978e78538d2a21ce465263a1f84ce755cfeb8#diff-dd023fbd0c2c0b45603ea23421f17eed

I tested with following: https://github.com/rogalmic/vscode-xml-complete/blob/master/test/RelativePath/Dir/RelativePath.xml

Please test version 0.2.12 as well, provide feedback if needed. https://travis-ci.org/github/rogalmic/vscode-xml-complete/builds/726755370

kobiersky commented 3 years ago

Thx. Loading works fine however it seems your plugin cannot cope with my hierarchical XSD which is using following. Included elements are then not recognized.

We could close this problem and open new one for this if you feel it is solvable.

rogalmic commented 3 years ago

Can you try with new version 0.2.13?

GitMensch commented 3 years ago

I suggest closing this as it is actually solved. @kobiersky if your other issue is still there with the current version please create a separate issue for that. THX.