-
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
Validate XML Schema with Xerces XSD validator. #390
Conversation
@fbricon @NikolasKomonen if you wish to play with XSD validator you can use XSD files https://github.com/angelozerr/lsp4xml/tree/xsdvalidator/org.eclipse.lsp4xml/src/test/resources/validation/schema |
Please note that I tested with JDK 11 and it works (test was done with JDK 11 because I'm using Java Reflection because Xerces cannot work with reporter (only error handler) for XSD validator) |
.../src/main/java/org/eclipse/lsp4xml/extensions/xsd/participants/diagnostics/XSDValidator.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/eclipse/lsp4xml/extensions/xsd/participants/diagnostics/XSDValidator.java
Show resolved
Hide resolved
...4xml/src/test/java/org/eclipse/lsp4xml/extensions/contentmodel/XMLSchemaDiagnosticsTest.java
Show resolved
Hide resolved
.../src/main/java/org/eclipse/lsp4xml/extensions/xsd/participants/diagnostics/XSDValidator.java
Outdated
Show resolved
Hide resolved
using: <?xml version='1.0'?>
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>
<xs:element name='note'>
<xs:complexType>
<xs:sequence>
<xs:element nhame='to' type='xs:string' nillable='false' />
<xs:element name='from' type='xs:string' />
<xs:element name='heading' type='xs:string' />
<xs:element name='body' type='xs:string' nillable='false' />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema> |
Signed-off-by: azerr <[email protected]>
Error ranges was implemented like WTP XML Editor, but there are some error ranges which ar emissing like you have found. I hav eimplemented it but we need other error I think. Perhaps it could be an another PR? |
Works well for me, and if any error ranges were missed we can create new issues for them. |
See #190
Signed-off-by: azerr [email protected]