Fix error range for sch-props-correct.2 #474
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #462
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]