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

Validation needs additional <uri> catalog entry #217

Closed
ralfhandl opened this issue Nov 12, 2018 · 9 comments
Closed

Validation needs additional <uri> catalog entry #217

ralfhandl opened this issue Nov 12, 2018 · 9 comments
Labels
bug Something isn't working catalog completion This issue or enhancement is related to completion support validation
Milestone

Comments

@ralfhandl
Copy link

To make validation and completion work I currently need two catalog entries, e.g.

  <public publicId="urn:oasis:names:tc:entity:xmlns:xml:catalog" uri="./schemas/catalog.xsd" />
  <uri name="urn:oasis:names:tc:entity:xmlns:xml:catalog" uri="./schemas/catalog.xsd" />

From the XML Catalog specification I would have expected to just need the <uri> entry because <public> is intended for resolving external identifiers and expressly not for resolving XML namespace names:

External Identifiers, as defined in [Production 75] of [XML], identify the external subset, entities, and notations of an XML document. They are not used to identify other resources such as namespace names, stylesheets, and schema languages other than DTDs; URI entries are used for that purpose.

However with just a <uri> entry neither validation nor code completion are triggered.

Note: this issue is of low importance as validation and completion work fine as long as the catalog contains these "duplicate" entries. Mentioning this in documentation on "how to write a catalog.xml" would be sufficient.

@angelozerr
Copy link
Contributor

angelozerr commented Nov 12, 2018

@ralfhandl I have tried to debug the xml-resolver project but to be honnest with you, I'm a little lost -(

I have tried to use your XML catalog with Eclipse WTP, but only completion is working, the validation doesn't work.

It should be really cool if somebody could help us to know if catalog is valid or not.

@ralfhandl
Copy link
Author

@angelozerr Strange. I'm also using Eclipse Photon with the editor from

  • Eclipse XML Editors and Tools
  • 3.10.0.v201804210200
  • org.eclipse.wst.xml_ui.feature.feature.group
  • Eclipse Web Tools Platform

The file ...eclipse-workspace-Photon\.metadata\.plugins\org.eclipse.wst.xml.core\user_catalog.xml only contains <uri> entries, e.g.

  <uri name="http://docs.oasis-open.org/odata/ns/edm" uri="platform:/resource/OData-TC/odata-csdl-schemas/schemas/edm.xsd"/>
  <uri name="http://docs.oasis-open.org/odata/ns/edmx" uri="platform:/resource/OData-TC/odata-csdl-schemas/schemas/edmx.xsd"/>

Validation and code completion both work fine with this catalog.

@angelozerr
Copy link
Contributor

@ralfhandl once build will be finished, please retry it.

@fbricon
Copy link
Contributor

fbricon commented Nov 13, 2018

@angelozerr I assume you'll add some tests ;-)

@angelozerr angelozerr added completion This issue or enhancement is related to completion support validation catalog labels Nov 13, 2018
@angelozerr
Copy link
Contributor

Yes sure @fbricon! It's a reason why I have not closed this issue and other issues of 0.0.3 like #214

@ralfhandl
Copy link
Author

@angelozerr works fine with build #506, thanks! My catalog.xml now only contains <uri> entries.

@angelozerr
Copy link
Contributor

Great! is there some other issues with XML catalog?

@ralfhandl
Copy link
Author

@angelozerr no issues with XML catalogs any more, thanks!

angelozerr added a commit that referenced this issue Nov 13, 2018
@angelozerr
Copy link
Contributor

Test works, I close this issue. Thanks @Again @ralfhandl !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working catalog completion This issue or enhancement is related to completion support validation
Projects
None yet
Development

No branches or pull requests

3 participants