-
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
Bad SYSTEM for DTD DocType and Entity breaks the XML validation. #647
Comments
Could you share your xml and dtd please. I cannot reproduce it. |
Thanks for the quick reply. I tested some things and the problem seems to be related to some entity references.
If I delete the
If I keep the
Unlike in the previous file, removing the |
I have also tried referencing all entity files directly from the XML file instead, but the result is the same, that is, as long as I refer to |
Suddenly after restarting VS code (for about the 6th time since I first encountered this error), everything worked perfectly, even though all contents, declarations and references were the same as originally. Another restart of VS code, and everything is back to the previously described problem. |
Not sure this is useful but the referenced
|
Many thanks @Oobiewan for your detailed information. I can reproduce the problem. I need some investigation to understand the problem. |
@Oobiewan it seems http://www.docbook.org/xml/4.4/xinclude.mod is not available? |
@angelozerr correct, http://www.docbook.org/xml/4.4/xinclude.mod is not available at this specific address, but it is mapped with a catalog file to a local file in the vs code property
In a comment above I have copied the complete contents of this local .mod file. You can create it for yourself and add its location to the catalog if you want to reproduce this part of the implementation I have. But I think you can also refer to the .mod file directly from the XML, or simply remove the xinclude declaration and reference completely from the doctype definition as there is no xinclude element in my document anyway. |
One more test I just did confirms that it might be something with the multi-level entity files: |
Yes, I'm pretty sure that was one of the first things I did. |
@angelozerr What I either haven't tried before or tried it when there were still other problems with the setup is triggering the re-validation manually with the "Revalidate current XML file" command. Apparently if I trigger this, the validation works properly even with the original setup of the entities. Strangely, if I remove the |
Fixes redhat-developer/vscode-xml#647 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer/vscode-xml#647 Signed-off-by: azerr <azerr@redhat.com>
I have started to fix some errors. Is it possible to share an XML which elements from xinclude.ent please. |
In this zip I have added a set of files with xincludes. |
Not sure if that's also a validation problem or simply a missing feature, but it seems like the plugin cannot handle the references to content within xi:include entities. E.g, if you try to use an |
Fixes redhat-developer/vscode-xml#647 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer/vscode-xml#647 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer/vscode-xml#647 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer/vscode-xml#647 Signed-off-by: azerr <azerr@redhat.com>
@Oobiewan I'm working on this issue and I think I have found a solution. For the moment I have created 2 PR to improve a little entities support: |
@angelozerr Sounds fantastic, thank you very much. Looking forward to trying it. |
@Oobiewan could you install last vsix from https://download.jboss.org/jbosstools/vscode-xml/staging/?C=M;O=D and give us feedback if it works better now? You should have too :
Please give us feedback if it works and don't hesitate to create detailed issues (I think entities support is not perfect) to improve vscode-xml. |
please create an issue for that. |
Hi @angelozerr , the files are now validated continuously even with the parameter reference in place. The features in the referenced pull requests also seem to work fine. Thank you. |
Thanks for your feedback. To be honnest with you I dont know xi include. So please create a detailled issue with the expected behavior in the issue. |
Fixed with eclipse-lemminx/lemminx#1169 |
When I start VS Code and an xml document is open, it is validated as expected, and problems are thrown where needed. However, if I close the file with problems and then open it again, no validation happens anymore, and no problems are shown. The same way, if I fix problems in a file with invalid structures and the validation does not find any problems anymore, I cannot trigger the validation anymore, even if I write content that is not only invalid according to the defined DTD but even invalid xml is not shown as a problem. Basically validation never works except when opening vs code.
I am trying to validate xml files against the DocBook 4.4 DTD.
The text was updated successfully, but these errors were encountered: