Skip to content

Multiple active schemas lead to inconsistencies in UI #1090

@marrom18

Description

@marrom18

When multiple schemas are active, the schema shown on hover is inconsistent with the errors displayed in the UI.

We developed a VSCode extension for our users that relies on your XML extensions for error highlighting and autocompletion. In our extension, we specify a schema using the XMLFileAssociations API, which works well. However, users can also set their own schema using the "xsi:noNamespaceSchemaLocation" attribute. When two schemas are active, the UI behaves oddly. It seems that the errors displayed in the UI come from the schema linked via the namespace location, but the error popup references the wrong schema. This causes users to think the error originates from the schema we set using the API.

Unfortunately, there's not much we can do about this, as users can set that value themselves. Before we created this extension, this was the default method for users to set the schema.

To reiterate, in our VS-Code extension we us two different ways on specifing a schema:

  1. Via the "xsi:noNamespaceSchemaLocation" attribute.
  2. Via the "schemaVersion" attribute. This way our VS-Code extension sets the correspondig schema via the XMLFileAssociations API.

The idea is that (1) overrides (2) in the RedHat XML extension.

This works basically, the correct schema is shown when hovering any XML tag. Unfortunately, the red underlining (showing errors in XML file) use schema (2), but should use (1).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions