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

Fix error range for sch-props-correct.2 #474

Merged
merged 1 commit into from
Jun 28, 2019
Merged

Fix error range for sch-props-correct.2 #474

merged 1 commit into from
Jun 28, 2019

Conversation

xorye
Copy link

@xorye xorye commented Jun 27, 2019

Fixes #462

image

The only argument provided by xerces was:
arguments[0] = ",elt1"

From the xerces source code, it looks like if a namespace exists, it gets placed right before the attribute value:
https://github.com/apache/xerces2-j/blob/cf0c517a41b31b0242b96ab1af9627a3ab07fcd2/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java#L3384-L3389

I'm not sure if I interpreted this correctly, but I tried to take into account the situation where a namespace does exist:
https://github.com/xorye/lsp4xml/blob/be47ec532e8b566b1c779efe50253fc18e41216c/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/extensions/xsd/participants/XSDErrorCode.java#L137

I did not add a test case for that specific situation, because I'm not very sure how to add a namespace and create a sch-props-correct.2 error at the same time.

Signed-off-by: David Kwon [email protected]

@angelozerr angelozerr merged commit 3bbcc0f into eclipse-lemminx:master Jun 28, 2019
@angelozerr
Copy link
Contributor

Thanks @xorye !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fixed error range for sch-props-correct.2
3 participants