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

Documents with an Internal Subset DOCTYPE had stopped trying to bind #379

Closed
zwaldowski opened this issue May 20, 2019 · 7 comments · Fixed by #519
Closed

Documents with an Internal Subset DOCTYPE had stopped trying to bind #379

zwaldowski opened this issue May 20, 2019 · 7 comments · Fixed by #519
Assignees
Labels
bug Something isn't working DTD validation
Milestone

Comments

@zwaldowski
Copy link

My organization has documents like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE root [
    <!ENTITY foo "Bar">
]>

I'm trying to bind these documents using fileAssociations, but lsp4xml stops trying to bind at the DOCTYPE. It should continue looking for xsi:schemaLocation and in fileAssociations when the DOCTYPE lacks a DTD reference.

@fbricon fbricon added this to the v0.8.0 milestone Jul 3, 2019
@angelozerr
Copy link
Contributor

@zwaldowski could you please share a little vscode project with cases that you are describing please and give us trouble that you have (completion that you are waiting). Thanks!

@zwaldowski
Copy link
Author

See here. See the screenshots in the gist's comments.

I was having trouble getting the fileAssociations to bind correctly, so it's not a full vscode project; that's not the issue, though (that's my own inexperience 🙂). So it's just the single article.xml demonstrating the issue.

@angelozerr
Copy link
Contributor

Thank's @zwaldowski for your feedback. I tested with your article.xml and I have the same issue but WTP XML Editor from Eclipse display the same errors. I'm not sure that we can mix internal DTD and XML Schema like this?

@zwaldowski
Copy link
Author

I'm not familiar with WTP XML Editor. When we use Jing to render these documents, we bind a RelaxNG schema to it and it handles the entities fine. We've done this for ~15 years. Can you help me understand why this shouldn't work another way, perhaps?

@angelozerr
Copy link
Contributor

It's a limitation of Xerces. But I found a topic about this problem https://www.oxygenxml.com/forum/topic12812.html#p36904 and Oxygen fixes the problem. The idea is to not validate XML with DTD (DOCTYPE) if DOCTYPE doesn't define <!ELEMENT or doesn't define PUBLIC, SYSTEM path.

I will try to follow this rule. I give you feedback if I can manage that.

angelozerr pushed a commit that referenced this issue Jul 17, 2019
angelozerr pushed a commit that referenced this issue Jul 17, 2019
angelozerr pushed a commit that referenced this issue Jul 18, 2019
angelozerr pushed a commit that referenced this issue Jul 18, 2019
angelozerr pushed a commit that referenced this issue Jul 18, 2019
angelozerr pushed a commit that referenced this issue Jul 18, 2019
@angelozerr angelozerr added bug Something isn't working DTD validation labels Jul 18, 2019
angelozerr pushed a commit that referenced this issue Jul 18, 2019
@angelozerr angelozerr changed the title Documents with an Internal Subset DOCTYPE shouldn't stop trying to bind Documents with an Internal Subset DOCTYPE had stopped trying to bind Jul 23, 2019
@zwaldowski
Copy link
Author

Amazing work, thanks!

@angelozerr
Copy link
Contributor

Glad it works for you @zwaldowski .Many thanks for your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working DTD validation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants