Skip to content
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

xml catalog definition should be built-in #942

Merged
merged 1 commit into from
Dec 8, 2020

Conversation

angelozerr
Copy link
Contributor

@angelozerr angelozerr commented Dec 8, 2020

xml catalog definition should be built-in

Fixes redhat-developer/vscode-xml#375

Signed-off-by: azerr [email protected]

@angelozerr
Copy link
Contributor Author

This PR embeds catalog.xsd. It doesn't provide tests because there are some existing tests with XML catalog.

To test locally the PR:

  • remove the local lemminx cache
  • disconnect internet (to check catalog.xsd comes from the embed catalog and not from the http url)
  • create a catalog.xml file without DTD or XSD liek this:
<?xml version="1.0"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
</catalog>

You should benefit with completion, validation etc.

@angelozerr angelozerr requested a review from datho7561 December 8, 2020 15:12
@angelozerr angelozerr changed the title xml catalog definition should be in-built xml catalog definition should be built-in Dec 8, 2020
@angelozerr angelozerr force-pushed the embedded-xsd-catalog branch from b00bfb7 to 2360097 Compare December 8, 2020 15:21
@datho7561
Copy link
Contributor

datho7561 commented Dec 8, 2020

It doesn't use the embedded version if a schemaLocation is specified. Is this intentional? I can see why this could be helpful.

@angelozerr
Copy link
Contributor Author

It doesn't use the embedded version if a schemaLocation is specified. Is this intentional? I can see why this could be helpful.

Yes it's normal. If you use schemaLocation it means that you want to specify a given XSD. the usecase here is to provide a default XSD for urn:oasis:names:tc:entity:xmlns:xml:catalog namespace URI.

@datho7561 datho7561 merged commit 31e88e1 into eclipse-lemminx:master Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

xml catalog definition should be built-in
2 participants