-
Notifications
You must be signed in to change notification settings - Fork 82
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 entities declared in a DTD are marked undeclared after XML file change #234
XML entities declared in a DTD are marked undeclared after XML file change #234
Comments
I need to either reload VSCode or save |
DTD entity validation is indeed not very stable, we need to improve it. I need to investigate the problem. |
Thanks, that would be great! |
Thanks @ph777 for your detailed explanation. I can reproduce it and the bug is not trivial. It comes from the custom LemMinx cache of DTD which is used to avoid parsing referenced DTD grammar each time you type something in the XML editor. The first time DTD grammar is not in the cache, the validation error for entities is correct. The second time when DTD grammar is on the cache, the Xerces validator doesn't reparse the DTD (because it is on the cache), that's nice but as it doesn't parse the DTD, it doesn't collect the declared entities and you have crazy errors about entities. But I have some ideas to fix this problem. I will ping you as soon as I will find a fix. |
Great news! It sounds promising.
Dne čt 26. bře 2020 10:43 uživatel Angelo <[email protected]> napsal:
… Thanks @ph777 <https://github.com/ph777> for your detailed explanation.
I can reproduce it and the bug is not trivial. It comes from the custom
LemMinx cache of DTD which is used to avoid parsing referenced DTD grammar
each time you type something in the XML editor.
But I have some ideas to fix this problem. I will ping you as soon as I
will find a fix.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#234 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE3ZQXBDH6YTUEZUSUDGKXDRJMPTJANCNFSM4LTLMFXQ>
.
|
change Fixes redhat-developer/vscode-xml#234 Signed-off-by: azerr <[email protected]>
change Fixes redhat-developer/vscode-xml#234 Signed-off-by: azerr <[email protected]>
change Fixes redhat-developer/vscode-xml#234 Signed-off-by: azerr <[email protected]>
change Fixes redhat-developer/vscode-xml#234 Signed-off-by: azerr <[email protected]>
change Fixes redhat-developer/vscode-xml#234 Signed-off-by: azerr <[email protected]>
change Fixes redhat-developer/vscode-xml#234 Signed-off-by: azerr <[email protected]>
change Fixes redhat-developer/vscode-xml#234 Signed-off-by: azerr <[email protected]>
@ph777 I create a PR to fix this issue eclipse-lemminx/lemminx#636, here a demo: |
change Fixes redhat-developer/vscode-xml#234 Signed-off-by: azerr <[email protected]>
change Fixes redhat-developer/vscode-xml#234 Signed-off-by: azerr <[email protected]>
change Fixes redhat-developer/vscode-xml#234 Signed-off-by: azerr <[email protected]>
change Fixes redhat-developer/vscode-xml#234 Signed-off-by: azerr <[email protected]>
change Fixes redhat-developer/vscode-xml#234 Signed-off-by: azerr <[email protected]>
change Fixes redhat-developer/vscode-xml#234 Signed-off-by: azerr <[email protected]>
Great news! Thanks! When can we expect the 0.12.0 version to be released? |
Perhaps in 3 weeks. But you can install the current version vsix at It should be good if you could do that to give us feedback before the release. Thanks. |
I have a DTD file
base.dtd
that declares an XML entityexternal
:I have an XML file
file.xml
that references the DTD file and declares an XML entitylocal
. To make the case clear it also uses an undeclared entityundeclared
.Now, if I open
file.xml
in VSCode, the DTD is recognized and the&undeclared;
is correctly marked with anEntityNotDeclared
error.However, once I modify
file.xml
, e.g. by putting a new line or space anywhere (any safe place that does not break well-formdness of XML, e.g. after<root-element>
opening tag), the&external;
entity gets marked with anEntityNotDeclared
error, which is NOT correct.Is it possible to fix it? This error is really annoying in large XML files with a lot of externally declared XML entities. Once you modify your XML it gets red all over and you easily miss your real errors in XML. Or is this a lemminx problem?
Thanks
The text was updated successfully, but these errors were encountered: