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

Report only XML syntax error for *.exsd files #1308

Merged
merged 1 commit into from
Oct 11, 2022

Conversation

angelozerr
Copy link
Contributor

@angelozerr angelozerr commented Oct 6, 2022

Report only XML syntax error for *.exsd files

According this comment eclipse-pde/eclipse.pde#175 (comment), *.exd files must report XML syntaxs error without XSD errors.

Signed-off-by: azerr [email protected]

@angelozerr angelozerr added this to the 0.22.0 milestone Oct 6, 2022
@angelozerr
Copy link
Contributor Author

To benefit of this PR on vscode-xml, the PR redhat-developer/vscode-xml#782 should be used and merged.

This PR provides the capability to:

  • report XML syntax validation for *.exsd files
  • don't report XSD validation for *.exsd files.

Given this test.exsd file:

<schema xmlns="http://www.w3.org/2001/XMLSchema">
   <annotation>
      <appInfo>
      </appInfo>
   </annotation>
</schema>

You should see no error., If you rename the file with test.xsd, you should see the XSD error:

image

It means *.exsd file don't report some XSD error, but it should report XML syntax error, to test that update the test.exsd with this content:

<schema xmlns="http://www.w3.org/2001/XMLSchema">
   <annotation>
</schema>

You should see the following error:

image

@datho7561
Copy link
Contributor

If I add a <?xml-model...?> processing instruction, schema-related errors are still reported in .exsd files

@angelozerr
Copy link
Contributor Author

If I add a processing instruction, schema-related errors are still reported in .exsd files

Could we see that in an another PR please. The main goal today is to have a support of *.exsd files in Eclipse IDE, and xml-model is never used in *.exsd files.

Copy link
Contributor

@datho7561 datho7561 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well for me.

@datho7561 datho7561 added the enhancement New feature or request label Oct 11, 2022
@datho7561 datho7561 merged commit cae0d24 into eclipse:main Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants