lemminx icon indicating copy to clipboard operation
lemminx copied to clipboard

Using DTD generator quick fix causes error message because DTD content has not been saved

Open xorye opened this issue 5 years ago • 0 comments

In the following xml:

<a>
    <b></b>
</a>

Hover over the start tag for element a and click on one of the DTD-generating quick fixes: image

After the quick fix, an empty file.dtd is created with DTD content added, but not saved. Therefore there are error messages in the current xml:

image

Only after saving file.dtd, would these error messages disappear: image

It would be great if there were no error messages at all, since at first glance, it might seem like the quick fix caused errors.

I've thought of some ways to acheive this:

  • create a custom command on the client side that either saves or opens file.dtd
  • send a notification to the client that tells the user to save the new schema

xorye avatar Jun 23 '20 21:06 xorye