-
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
Does not support XSD 1.1 #363
Comments
@bmix do you mind providing some sample documents reproducing the issue? |
Thank you, for investigation. When I open the following XSD in the oXygen XML IDE, using Xerces2 (offending place highlighted in image): <?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="test"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
targetNamespace="test"
elementFormDefault="qualified"
vc:minVersion="1.1">
<xs:complexType name="testType">
<xs:all>
<xs:element name="testEle" minOccurs="1" maxOccurs="unbounded" type="xs:string"/>
<xs:element name="testEleTwo" type="xs:string"/>
</xs:all>
</xs:complexType>
<xs:element name="testDoc">
<xs:complexType>
<xs:sequence>
<xs:element name="testContainer" type="t:testType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema> I get no problem shown. As soon, however, I remove the
This makes me conclude, that the error is bound to differences between 1.0 and 1.1 of XSD, as also indicated by this answer on Stack Overflow:
When using the same data in VCode with Red Hat's XML Tools for this XML instance document (instance1.xml): <?xml version="1.0" encoding="UTF-8"?>
<t:testDoc xmlns:t="test"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="test file:/path/to/issue.xsd">
<t:testContainer>
<t:testEle>testEle0</t:testEle>
<t:testEle>testEle1</t:testEle>
<t:testEle>testEle2</t:testEle>
<t:testEleTwo>testEleTwo0</t:testEleTwo>
</t:testContainer>
</t:testDoc> I get these two errors in VCode: {
"resource": "/path/to/instance1.xml",
"owner": "_generated_diagnostic_collection_name_#1",
"code": "cvc-complex-type.2.4.a",
"severity": 8,
"message": "Invalid element name:\n - testEle\n\nOne of the following is expected:\n - testEleTwo\n\nError indicated by:\n {test}\nwith code:",
"source": "xml",
"startLineNumber": 8,
"startColumn": 4,
"endLineNumber": 8,
"endColumn": 13
}
{
"resource": "path/to/instance1.xml",
"owner": "_generated_diagnostic_collection_name_#1",
"code": "cos-all-limited.2",
"severity": 8,
"message": "cos-all-limited.2: The {max occurs} of an element in an 'all' model group must be 0 or 1. The value 'unbounded' for element 'testEle' is invalid.",
"source": "xml",
"startLineNumber": 11,
"startColumn": 11,
"endLineNumber": 11,
"endColumn": 11
} |
I've looked into it and at the moment we don't support validation for XSD 1.1 Here are some references for when it is eventually worked on: http://www.herongyang.com/XSD/Xerces2-Xsd11SchemaValidator-XSD-1-1-Validation.html |
AFter reading the great article https://blog.adamretter.org.uk/xerces-xsd11-maven/ the problem comes from the official To fix the problem, we must switch from the official <dependency>
<groupId>org.exist-db.thirdparty.xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.12.0</version>
<classifier>xml-schema-1.1</classifier>
</dependency> After this dependency change, the error with
If I change vc:minVersion to vc:minVersion="1.0", the error appears again. @fbricon do you think we should change the xerces dependency? My fear is about IP Process for Eclipse. |
@angelozerr @fbricon I'm trying this out and the tests fail with some I've tried in the root pom file to put something similar to: <plugin>
<configuration>
<argLine>-Xmx1g</argLine>
.... But it doesn't work. Haven any of you seen this issue before? |
Fix #363 Signed-off-by: azerr <[email protected]>
Fix #363 Signed-off-by: azerr <[email protected]>
Fix #363 Signed-off-by: azerr <[email protected]>
Fix #363 Signed-off-by: azerr <[email protected]>
See eclipse-lemminx/lemminx#363 Signed-off-by: azerr [email protected]
See eclipse-lemminx/lemminx#363 Signed-off-by: azerr [email protected]
Fix #363 Signed-off-by: azerr <[email protected]>
Fix #363 Signed-off-by: azerr <[email protected]>
Fix #363 Signed-off-by: azerr <[email protected]>
Fix #363 Signed-off-by: azerr <[email protected]>
Fix #363 Signed-off-by: azerr <[email protected]>
Fix #363 Signed-off-by: azerr <[email protected]>
Fix #363 Signed-off-by: azerr <[email protected]>
Fix #363 Signed-off-by: azerr <[email protected]>
Fix #363 Signed-off-by: azerr <[email protected]>
Fix #363 Signed-off-by: azerr <[email protected]>
Fix #363 Signed-off-by: azerr <[email protected]>
With a document instance, that is specced with XSD v1.1, I just got:
cos-all-limited.2: The {max occurs} of an element in an 'all' model group must be 0 or 1. The value 'unbounded' for element 'Bcc' is invalid.
However, when validating with Xerces2 I get no complaints. Could it be, that XSD 1.1 is not supported?
The text was updated successfully, but these errors were encountered: