redhat-developer / redhat-developer/vscode-xml
0.14: catalog not accepted when DOCTYPE catalog 1.1 is present
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 328
- Forks
- 101
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 7
Description
I have updated to 0.14 and my XML file is not associated with the grammar anymore. When I remove
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD XML Catalogs V1.1//EN" "http://www.oasis-open.org/committees/entity/release/1.1/catalog.dtd">
from the catalog (or change the version to 1.0), everything is fine. I don't know if this is intended or not, I just want to report this. Please feel free to close this without any comment.
To reproduce:
I have a file called layout.xml with this contents:
<Layout xmlns="urn:speedata.de:2009/publisher/en">
</Layout>
The setting xml.catalog lists this file:
/Users/patrick/work/software/publisher/schema/catalog-schema-en.xml
and the contents of this file is
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD XML Catalogs V1.1//EN" "http://www.oasis-open.org/committees/entity/release/1.1/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<!-- W3C schema -->
<uri name="urn:speedata.de:2009/publisher/en" uri="/Users/patrick/work/software/publisher/schema/layoutschema-en.xsd"/>
</catalog>
The grammar is not associated with the xml file.
Now I remove the second line (<!DOCTYPE...) and the catalog file is "accepted" and my XML file gets autocompletion etc.
It used to work with XML extension 0.13.
When I insert
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
instead of version 1.1, the XSD grammar is also accepted.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the provided layout.xml and catalog-schema-en.xml examples, comparing the XML Catalog 1.1 and 1.0 DOCTYPE declarations. The fix is complete when a catalog using the 1.1 declaration is accepted and the XML file receives its grammar and autocompletion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100