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

Fixed error range for EntityNotDeclared #518

Closed
angelozerr opened this issue Jul 17, 2019 · 1 comment
Closed

Fixed error range for EntityNotDeclared #518

angelozerr opened this issue Jul 17, 2019 · 1 comment
Assignees
Labels
bug Something isn't working DTD validation
Milestone

Comments

@angelozerr
Copy link
Contributor

Given this XML file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article [
  <!ELEMENT article (#PCDATA)>
]>          
<article>
	&nbsp;
</article>

  should be highlighted. (It should be managed in XMLSyntaxErrorCode).

CodeAction could create the proper entity in the DOCTYPE like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article [
  <!ELEMENT article (#PCDATA)>
  <!ENTITY nbsp "entity-value">
]>           
<article>
	&nbsp;
</article>

We must take care of existing of doctype. For instance if we have

<?xml version="1.0" encoding="UTF-8"?>          
<article>
	&nbsp;
</article>

CodeAction should generate

<!DOCTYPE article [
  <!ENTITY nbsp "entity-value">
]>
@fbricon
Copy link
Contributor

fbricon commented Jul 23, 2019

Error range fix has been merged. Code action will be handled in #532

@fbricon fbricon closed this as completed Jul 23, 2019
@angelozerr angelozerr added the bug Something isn't working label Jul 23, 2019
@angelozerr angelozerr changed the title Error range for EntityNotDeclared Error range for EntityNotDeclared Jul 23, 2019
@angelozerr angelozerr changed the title Error range for EntityNotDeclared Fixed error range for EntityNotDeclared Jul 23, 2019
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

No branches or pull requests

3 participants