redhat-developer / redhat-developer/vscode-xml

Does a catalog.xml overwrite a document-local schema association?

Open
#423 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
328
Forks
101
Avg merge
1d 17h
Merged PRs (30d)
7

Description

It appears to me that once I configure a catalog.xml, this will overrule a binding via <?xml-model?> in the document. Is this true? If yes, it would be preferable if the local schema association would take precedence. We quite often work with documents in the same namespace for which having a general entry in a catalog.xml is convenient. Nevertheless specific documents - while using the same namespace - may require a different schema with extensions.

What I see: as long as I have no catalog.xml configured, the document validates just fine against the (extended) schema given in <?xml-model?>. If I add a catalog.xml, associating the namespace with a different, basic schema, the document is no longer valid.

In the outline I see both schema listed and I'd like to have the first applied, while in fact the second seems to take precedence:

image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior with a catalog.xml namespace mapping and a document-local association, then compare the schemas shown in the outline with the schema used for validation. Trace how the XML extension resolves these two associations; done means the documented precedence is implemented and the example document validates against the intended extended schema.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode, xml
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.