-
Notifications
You must be signed in to change notification settings - Fork 93
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
Show relevant XML
completion options based on XML Schema
#347
Comments
This includes handling for (choice, all, and sequence) Fixes eclipse-lemminx#347 Signed-off-by: Nikolas <nikolaskomonen@gmail.com>
This includes handling for (choice, all, and sequence) Fixes eclipse-lemminx#347 Signed-off-by: Nikolas <nikolaskomonen@gmail.com>
as an addition ... it looks like the suggestions are always in alphabetical order, and ideally you want to get the suggestions in the sequence order, and restricted to what is possible at the location where the suggestion is make. (so limited to the elements that would "fit" there based on previous and next elements in the document) I am working with UBL XSDs where sequence is important: Also when you have a sequence and there are mandatory elements (<xsd:element minOccurs="1" maxOccurs="1"> it would be good to insert those when the parent element of that sequence is started. You already know that the XML wil not be valid without those mandatory elements anyway. and while you are at it ... then also insert the possible mandatory attributes of those elements :-) I would not go as far as inserting the mandatory elements of complexType elements in the original sequence.. because they might be recursive .. so that would dig you down into a very deep rabbit hole. |
Hi, I'm working on this issue right now trying to make sure it covers all cases. I will try to have a pr soon, which I hope people can test out to see if anything is missing. For XSD based element completion the server should eventually cover:
Let me know if you see any possible cases that are missing.
thanks @kduvekot for the idea, I'll make sure we implement this. |
This includes handling for (choice, all, and sequence) Fixes eclipse-lemminx#347 Signed-off-by: Nikolas <nikolaskomonen@gmail.com>
This includes handling for (choice, all, and sequence) Fixes eclipse-lemminx#347 Signed-off-by: Nikolas <nikolaskomonen@gmail.com>
This includes handling for (choice, all, and sequence) Fixes eclipse-lemminx#347 Signed-off-by: Nikolas <nikolaskomonen@gmail.com>
This includes handling for (choice, all, and sequence) Fixes eclipse-lemminx#347 Signed-off-by: Nikolas <nikolaskomonen@gmail.com>
This includes handling for (choice, all, and sequence) Fixes eclipse-lemminx#347 Signed-off-by: Nikolas <nikolaskomonen@gmail.com>
This includes handling for (choice, all, and sequence) Fixes eclipse-lemminx#347 Signed-off-by: Nikolas <nikolaskomonen@gmail.com>
This includes handling for (choice, all, and sequence) Fixes eclipse-lemminx#347 Signed-off-by: Nikolas <nikolaskomonen@gmail.com>
This includes handling for (choice, all, and sequence) Fixes eclipse-lemminx#347 Signed-off-by: Nikolas <nikolaskomonen@gmail.com>
This includes handling for (choice, all, and sequence) Fixes eclipse-lemminx#347 Signed-off-by: Nikolas <nikolaskomonen@gmail.com>
Fix #347 Signed-off-by: azerr <azerr@redhat.com>
@cassianstraessle @kduvekot @NikolasKomonen I'm working again on this (hard) issue. I hope it will be avaialble for 0.8.0 millestone. @NikolasKomonen I think we should use XSCMValidator from xerces that it is used in XMLSchemaValidator. I'm working on this idea. |
Fix #347 Signed-off-by: azerr <azerr@redhat.com>
Fix #347 Signed-off-by: azerr <azerr@redhat.com>
Fix #347 Signed-off-by: azerr <azerr@redhat.com>
Fix #347 Signed-off-by: azerr <azerr@redhat.com>
Fix #347 Signed-off-by: azerr <azerr@redhat.com>
Fix #347 Signed-off-by: azerr <azerr@redhat.com>
Fix #347 Signed-off-by: azerr <azerr@redhat.com>
Fix #347 Signed-off-by: azerr <azerr@redhat.com>
Fix #347 Signed-off-by: azerr <azerr@redhat.com>
Fix #347 Signed-off-by: azerr <azerr@redhat.com>
Fix #347 Signed-off-by: azerr <azerr@redhat.com>
Fix #347 Signed-off-by: azerr <azerr@redhat.com>
Fix #347 Signed-off-by: azerr <azerr@redhat.com>
Fix #347 Signed-off-by: azerr <azerr@redhat.com>
Fix #347 Signed-off-by: azerr <azerr@redhat.com>
relevant XML
completion options based on XML Schema
Given the schema above the code completion shows the following behavior:
<data>
the code completion suggests both elements<e1>
and<e2>
. But only<e1>
is a valid choice.<e1>
and<e2>
. But only<e2>
is a valid choice.The schema validation correctly points out the invalid elements. But code completion should not suggest invalid elements in the first place.
I observed this behavior with redhat.vscode-xml v0.5.0
The text was updated successfully, but these errors were encountered: