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

no code completion on nested xml elements #66

Closed
tenluap opened this issue Oct 28, 2018 · 11 comments
Closed

no code completion on nested xml elements #66

tenluap opened this issue Oct 28, 2018 · 11 comments
Labels
bug Something isn't working
Milestone

Comments

@tenluap
Copy link

tenluap commented Oct 28, 2018

Good day,
I will like to report an issue I noticed.

I created a custom xsd schema for a xml file. Am using Vscode with your vscode-xml extension.

The schema works for only the top elements giving me all its attributes from my xsd file but not on the nested elements in the xml file.

I used the same xsd schema file in Jetbrain Intellij and it worked fine.

Here is an example of my issue.
xml_schema_error2

I will really appreciate it if you could solve this problem in vscode for me. Thanks

And nice work on this project.

@angelozerr
Copy link
Contributor

@ehigiepaul I improved XML Schema in server but I don't know if vscode-xml use it.

Please share your xml + schema in order I reproduce your problem. Thanks!

@tenluap
Copy link
Author

tenluap commented Oct 28, 2018

Please find attached are the files i used

kll Page.zip

@fbricon
Copy link
Collaborator

fbricon commented Oct 28, 2018

Can you please share your file association settings? Also, give the latest vsix build a try.

@tenluap
Copy link
Author

tenluap commented Oct 28, 2018

Here is the file association setting I used and I downloaded the latest build, still the same result

"xml.fileAssociations": [{ "systemId": "d:\\USER\\Projects\\Clients\\tracker\\tracker\\schema\\tns.xsd", "pattern": "**/**/*.xml" }],

@fbricon
Copy link
Collaborator

fbricon commented Oct 28, 2018

Latest build gives even different errors, no completion at all:

screen shot 2018-10-28 at 10 48 29 am

Look like a severe regression server-side

@fbricon fbricon added the bug Something isn't working label Oct 28, 2018
@tenluap
Copy link
Author

tenluap commented Oct 28, 2018

I got the same issue. I solved that by
replacing this line

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.nativescript.org/tns.xsd" id="tns" targetNamespace="http://schemas.nativescript.org/tns.xsd" elementFormDefault="qualified" attributeFormDefault="unqualified">

with this

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">

Just remove the namespace and targetNamespace attributes from the xsd file

But i still get the swirling line on the Page tag, I get completion on the top element but still not on the nested.

Here is the update zip file with the fixed xsd file
kll Page.zip

@angelozerr
Copy link
Contributor

Please create an issue at https://github.com/angelozerr/lsp4xml/issues

I suspect the use of xs:extension causes the problem (perhaps which is not supported?), but I have not sure.

@fbricon fbricon added this to the 0.2.0 milestone Oct 29, 2018
@fbricon
Copy link
Collaborator

fbricon commented Oct 29, 2018

Upstream issue: eclipse/lemminx#177

@tenluap
Copy link
Author

tenluap commented Oct 29, 2018

Can I get the latest VSIX Build with the fix from Lsp4xml repo, so i can test it out

@fbricon
Copy link
Collaborator

fbricon commented Oct 29, 2018

Sorry, but our CI server is currently down and no longer builds the vsix files.
Your best chance to get a new binary quickly is to build it yourself: follow steps 1-5, then, from the vscode-xml directory, execute:

  • npm install -g vsce
  • vsce package

It'll generate a new visx file under vscode-xml.

@tenluap
Copy link
Author

tenluap commented Oct 29, 2018

no problem thank, I just changed the org.eclipse.lsp4xml-all.jar file in the extension and it worked.
Thanks for your support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants