-
Notifications
You must be signed in to change notification settings - Fork 91
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
Adjust range for XML schema errors #72
Comments
@angelozerr what's the status on this one? |
It's not finished. The long task is to write tests (and find usecase). |
The IBM XML language server has a bunch of test samples that we can use for validating our solution. We can see that our diagnostic ranges look bad: @angelozerr is this something you're still working on or should I ask @NikolasKomonen to take over? |
Same file validated with IBM's server: |
Thanks for the info @fbricon I will try to improve this range problem. |
@fbricon I have managed selection of error date, but I have not written test. Do you think we can use the IBM Language Server invoice.xsd to write test? |
I guess you can. Project is EPL. In doubt you can easily create a simple schema with dates |
Ok thanks, I will create a new file for that according your suggestion
Yes I know that, the error is for The sample at https://wiki.xmldation.com/Support/Validator/cvc-datatype-valid-1-2-1 is for element text, but I tell me if for attribute value we can have this error too? I had implemented that in https://github.com/angelozerr/lsp4xml/blob/master/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/contentmodel/participants/XMLSchemaErrorCode.java#L120 (but it's commented). I would like to check if we can hav ethis error for attribute value. Once I will check it, I will write tests for that. |
@fbricon now we should have the same thing than IBM XML Language Server. |
Now it should be better. |
Are you sure that you are using version from master? Test are https://github.com/angelozerr/lsp4xml/blob/master/org.eclipse.lsp4xml/src/test/java/org/eclipse/lsp4xml/contentmodel/XMLSchemaDiagnosticsTest.java#L136 |
yes, that's why I made #139, to be sure about the version running |
Sorry @fbricon there were indeed a bug that it should be fixed. Sorry again -( |
Works now! Thanks @angelozerr ! |
Cool!
I think we can close this issue. I have managed the same adjust ranges than WTP, but as you have seen it missed some case that WTP doesn't manage. I hope we have the same feature than IBM Language Server. I propose you to close this issue and if we find new bugs, we could create a new issue with the given problem. |
Fair enough. closing |
@fbricon just for your information, I have played with the XML IBM XML Server and I have fixed few problems with completions and improve code actions. Here the code actions which are available: and here completion for attribute name: and for attribute value: The completion on attribute value is bugged when you fill the value, apply value is not well done. |
No description provided.
The text was updated successfully, but these errors were encountered: