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

Improved XML validation when XSD files are saved #506

Closed
angelozerr opened this issue Jul 10, 2019 · 0 comments · Fixed by #513
Closed

Improved XML validation when XSD files are saved #506

angelozerr opened this issue Jul 10, 2019 · 0 comments · Fixed by #513
Assignees
Labels
Milestone

Comments

@angelozerr
Copy link
Contributor

angelozerr commented Jul 10, 2019

When a XSD file is saved, it loop for all opened document and for each XML document, it checks if the saved XSD file bind the the current XML file. To do that DOMDocument#useSchemas is called. This method must be improved

  1. Windows OS problem

When XSD file is saved on Windows OS, it should revalidate all bound XML files, but it didn't do that.

After debugging, I have this error:

java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/azerr/Downloads/data_gxl_minimal++_minimal++_OHNE_DOC.gxl/book.xsd

  1. Manage only xs:schemaLocation, xs:noNamespaceSchemaLocation binding

If opened XML file is bound with a XML catalog, XML file assocotaions, DOMDocumnt#useSchemas doesn't takes care of this binding kind.

To fix both 1) and 2), the DOMDocumnt#useSchemas must be rewritten by using resolverExtensionManager#resolve.

@fbricon fbricon added this to the v0.8.0 milestone Jul 10, 2019
@angelozerr angelozerr changed the title Revalidate XML files when XSD files is saved doesn't work on Windows OS Improve revalidate XML files when XSD files is saved Jul 10, 2019
@angelozerr angelozerr self-assigned this Jul 16, 2019
@angelozerr angelozerr added bug Something isn't working validation labels Jul 16, 2019
angelozerr pushed a commit that referenced this issue Jul 16, 2019
Fix #506

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit that referenced this issue Jul 16, 2019
Fix #506

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit that referenced this issue Jul 16, 2019
Fix #506

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit that referenced this issue Jul 17, 2019
Fix #506

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit that referenced this issue Jul 17, 2019
Fix #506

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit that referenced this issue Jul 17, 2019
Fix #506

Signed-off-by: azerr <azerr@redhat.com>
@angelozerr angelozerr changed the title Improve revalidate XML files when XSD files is saved Improved XML validation when XSD files are saved Jul 23, 2019
@angelozerr angelozerr added enhancement New feature or request and removed bug Something isn't working labels Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants