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

Too many logs after completion, hover with XML that contains DTD subset #750

Closed
angelozerr opened this issue May 30, 2020 · 0 comments · Fixed by #751
Closed

Too many logs after completion, hover with XML that contains DTD subset #750

angelozerr opened this issue May 30, 2020 · 0 comments · Fixed by #751
Assignees
Labels
bug Something isn't working
Milestone

Comments

@angelozerr
Copy link
Contributor

Create a XML with DTD subset which have error like this:

<!DOCTYPE root-element [
  <!ELEMENT root-element (#PCDATA)>
  XXXXXXX
]>
<root-element>
  |
</root-element>

Open completion inside root-element, you should see 2 errors logs:

  • the first:
[Trace - 09:09:55] Received notification 'window/logMessage'.
Params: {
    "type": 1,
    "message": "May 30, 2020 09:09:55 org.eclipse.lemminx.extensions.dtd.contentmodel.CMDTDContentModelProvider createInternalCMDocument()\r\nMessage: Error while loading DOCTYPE subset\r\n::::3:3:41:The 
...
  • the second:
[Error - 09:09:55] May 30, 2020 09:09:55 org.eclipse.lemminx.extensions.dtd.contentmodel.CMDTDContentModelProvider createInternalCMDocument()
Message: Error while loading DOCTYPE subset
::::3:3:41:The markup declarations contained or pointed to by the document type declaration must be well-formed.
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
	at org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown Source)
...

Those 2 logs comes from of loading of CMDocument (to manage XML completion, hover based on DTD subset when subset declares <!ELEMENT). The load of CMDocument should never report errors.

@angelozerr angelozerr added the bug Something isn't working label May 30, 2020
angelozerr pushed a commit to angelozerr/lemminx that referenced this issue May 30, 2020
@angelozerr angelozerr self-assigned this May 30, 2020
@angelozerr angelozerr added this to the 0.12.0 milestone May 30, 2020
angelozerr pushed a commit to angelozerr/lemminx that referenced this issue May 30, 2020
fbricon pushed a commit that referenced this issue Jun 2, 2020
@xorye xorye changed the title Too many logs with XML which have DTD subset after XML completion, hover Too many logs after completion, hover with XML that contains DTD subset Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant