-
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
Initialize RelaxNG support with validation/completion/hover #828
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@angelozerr I'm getting somewhere with this! :) I just drafted a pull request with what I have so far. It does not yet work when packaged and used in vs code, but from the test cases you can see that it can produce proper diagnostics. Firstly, I'd be greatful if you could give me general feedback, if the general direction I'm taking seems reasonable to you. Furthermore, I have some more concrete questions:
|
also, the validation creates errors and warnings, but honestly, I can't think of a way/case to get a warning. Any ideas? |
I will try to do my best to find time and play with your PR. But your implementation means that you will parse twice the XML document (one by xerces, and one by jing) . That's why I wonder if we could create For your other comments, please let me time to study more jing. |
Sure thing, no hurry!
I absolutely see your point. I just could not figure out how to do that... But I can try and see what I can do. In any case, I'll see what I can do and will keep you updated. And if you find time to look into it, let me know if you have any suggestions. |
Today Xerces is on the top for validation because we customize it to have advanced support like error range instead of offset range. If I understand correctly JARV provides a Validation API, so it means that Xerces will not on the top of validation. In otherwords I would like to provides a Xerces XNI component implementd with Jing. Perhaps To study...
I will try as soon as I will find time. |
you mean something like this? :) I just came across this page, which lead me to NekoXNI. I haven't tried it out yet, but if I understand you correctly, that might be something, right? |
Well, the download link is dead, and I can't seem to find the files anywhere online... So NekoXNI is clearly not an option. (Or maybe you have better luck?) If we were to write a Jing-XNI-component ourself... roughly where would that come into play? In the |
@BalduinLandolt please see my draft PR #841 |
First step of #237, see also redhat-developer/vscode-xml#236.
To Do:
Check license compatibility.
For jing license, see https://github.com/relaxng/jing-trang/blob/master/copying.txt.
Ensure the Lemminx uber jar doesn't get out of hand.
use jing
(Note to self: github, maven, website )
start managing validation with RelaxNG. The idea is to create a classe
XMLModelRelaxNGValidator
and call it inlemminx/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/extensions/xerces/xmlmodel/XMLModelHandler.java
Line 123 in b1407bb
write unit tests
test manually
The text was updated successfully, but these errors were encountered: