eclipse / lemminx

XML Language Server
Eclipse Public License 2.0
257 stars 90 forks source link

Errors with GXL schema #264

Open felixfbecker opened 5 years ago

felixfbecker commented 5 years ago

I configured vscode-xml to use the GXL schema http://www.gupro.de/GXL/xmlschema/gxl-1.0.xsd for all .gxl files.

But when opening a GXL file, it gives a lot of errors:

image

And none of the code intelligence features work.

Here's an example file: data_gxl_minimal++_minimal++_OHNE_DOC.gxl.zip

The schema is official so I would expect it to work (and assume it's correct)

fbricon commented 5 years ago

have you tried with the latest vscode-xml ci build?

felixfbecker commented 5 years ago

No, I am using the marketplace version 0.2.0

felixfbecker commented 5 years ago

Same errors with vscode-xml-0.3.0-671.vsix

fbricon commented 5 years ago

have you succeeded in getting it to work in another IDE/editor? If yes, which one and how?

felixfbecker commented 5 years ago

No, this is the first time I use this and the first IDE I tried (and have available that I know supports this...)

NikolasKomonen commented 5 years ago

After a quick look, in the XSD it uses xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" instead of the regular xmlns:xsd="http://www.w3.org/2001/XMLSchema"

and from the errors it looks like it only works with the latter.

Not sure if xerces only supports the 2001 schema, need to investigate it.

angelozerr commented 5 years ago

I confirm what @NikolasKomonen said. I remember that I started to implement XSD validator but it was not finished. After activating XSD validator, I have this error:

image

I will try to finish my work on XSD validator and I will activate it. It will help a lot after to understand problems coming from XML Schema.

angelozerr commented 5 years ago

I fear that issue cannot be resolved since this error comes from xerces here https://github.com/apache/xerces2-j/blob/trunk/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java#L988

if (!SchemaSymbols.URI_SCHEMAFORSCHEMA.equals(uri)) {
  reportSchemaError("s4s-elt-schema-ns", new Object[] {elName}, element);
}

As you can see the test with namespace uri is hard coded.