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

"Bind to schema" doesn't work if the document doesn't have a root element #819

Closed
datho7561 opened this issue Nov 22, 2022 · 2 comments · Fixed by eclipse-lemminx/lemminx#1408
Assignees
Labels
bug Something isn't working
Milestone

Comments

@datho7561
Copy link
Contributor

eg. activate the "Bind to schema" command using the following XML document:

<?xml version="1.0" encoding="UTF-8"?>

A popup appears saying that the document is already bound to a grammar. It would be nice to get it to work even if there is no root element, or at least correct the popup to say that there needs to be a root element to bind to a grammar.

@datho7561 datho7561 added the bug Something isn't working label Nov 22, 2022
@angelozerr
Copy link
Contributor

I noticed too that the codelens doesn't appear Bind schema/grammar with XML content

<?xml version="1.0" encoding="UTF-8"?>

It should appear

@datho7561
Copy link
Contributor Author

It's probably something similar to eclipse-lemminx/lemminx#1396. I take a look at it.

@datho7561 datho7561 self-assigned this Dec 9, 2022
datho7561 added a commit to datho7561/lemminx that referenced this issue Dec 13, 2022
Allows you to use the code action to bind to a schema when
a document doesn't have a root element.
Also, the bind schema CodeLens is shown when the document doesn't
have a root element.
It generates an element `placeholder-element-name` when the binding
strategy requires a root element to function (eg. `schemaLocation`,
`noNamespaceSchemaLocation`).
It also uses `placeholder-element-name` when binding to a `.dtd` using a
DOCTYPE declaration.

Closes redhat-developer/vscode-xml#819

Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561 added a commit to datho7561/lemminx that referenced this issue Dec 13, 2022
Fixes redhat-developer/vscode-xml#819

Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561 added a commit to datho7561/lemminx that referenced this issue Dec 13, 2022
Allows you to use the code action to bind to a schema when
a document doesn't have a root element.
Also, the bind schema CodeLens is shown when the document doesn't
have a root element.
It generates an element `placeholder-element-name` when the binding
strategy requires a root element to function (eg. `schemaLocation`,
`noNamespaceSchemaLocation`).
It also uses `placeholder-element-name` when binding to a `.dtd` using a
DOCTYPE declaration.

Closes redhat-developer/vscode-xml#819

Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561 added a commit to datho7561/lemminx that referenced this issue Dec 13, 2022
Allows you to use the code action to bind to a schema when
a document doesn't have a root element.
Also, the bind schema CodeLens is shown when the document doesn't
have a root element.
It generates an element `placeholder-element-name` when the binding
strategy requires a root element to function (eg. `schemaLocation`,
`noNamespaceSchemaLocation`).
It also uses `placeholder-element-name` when binding to a `.dtd` using a
DOCTYPE declaration.

Closes redhat-developer/vscode-xml#819

Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561 added a commit to datho7561/lemminx that referenced this issue Dec 14, 2022
Allows you to use the code action to bind to a schema when
a document doesn't have a root element.
Also, the bind schema CodeLens is shown when the document doesn't
have a root element.
It generates an element `placeholder-element-name` when the binding
strategy requires a root element to function (eg. `schemaLocation`,
`noNamespaceSchemaLocation`).
It also uses `placeholder-element-name` when binding to a `.dtd` using a
DOCTYPE declaration.

Closes redhat-developer/vscode-xml#819

Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561 added a commit to datho7561/lemminx that referenced this issue Dec 14, 2022
Allows you to use the code action to bind to a schema when
a document doesn't have a root element.
Also, the bind schema CodeLens is shown when the document doesn't
have a root element.
It generates an element `placeholder-element-name` when the binding
strategy requires a root element to function (eg. `schemaLocation`,
`noNamespaceSchemaLocation`).
It also uses `placeholder-element-name` when binding to a `.dtd` using a
DOCTYPE declaration.

Closes redhat-developer/vscode-xml#819

Signed-off-by: David Thompson <davthomp@redhat.com>
@rgrunber rgrunber moved this to 👀 In review in IDE Cloudaptors Dec 14, 2022
datho7561 added a commit to datho7561/lemminx that referenced this issue Jan 4, 2023
Allows you to use the code action to bind to a schema when
a document doesn't have a root element.
Also, the bind schema CodeLens is shown when the document doesn't
have a root element.
It generates an element `placeholder-element-name` when the binding
strategy requires a root element to function (eg. `schemaLocation`,
`noNamespaceSchemaLocation`).
It also uses `placeholder-element-name` when binding to a `.dtd` using a
DOCTYPE declaration.

Closes redhat-developer/vscode-xml#819

Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561 added a commit to datho7561/lemminx that referenced this issue Jan 4, 2023
Allows you to use the code action to bind to a schema when
a document doesn't have a root element.
Also, the bind schema CodeLens is shown when the document doesn't
have a root element.
It generates an element `placeholder-element-name` when the binding
strategy requires a root element to function (eg. `schemaLocation`,
`noNamespaceSchemaLocation`).
It also uses `placeholder-element-name` when binding to a `.dtd` using a
DOCTYPE declaration.

Closes redhat-developer/vscode-xml#819

Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561 added a commit to datho7561/lemminx that referenced this issue Jan 4, 2023
Allows you to use the code action to bind to a schema when
a document doesn't have a root element.
Also, the bind schema CodeLens is shown when the document doesn't
have a root element.
It generates an element `placeholder-element-name` when the binding
strategy requires a root element to function (eg. `schemaLocation`,
`noNamespaceSchemaLocation`).
It also uses `placeholder-element-name` when binding to a `.dtd` using a
DOCTYPE declaration.

Closes redhat-developer/vscode-xml#819

Signed-off-by: David Thompson <davthomp@redhat.com>
angelozerr pushed a commit to eclipse-lemminx/lemminx that referenced this issue Jan 8, 2023
Allows you to use the code action to bind to a schema when
a document doesn't have a root element.
Also, the bind schema CodeLens is shown when the document doesn't
have a root element.
It generates an element `placeholder-element-name` when the binding
strategy requires a root element to function (eg. `schemaLocation`,
`noNamespaceSchemaLocation`).
It also uses `placeholder-element-name` when binding to a `.dtd` using a
DOCTYPE declaration.

Closes redhat-developer/vscode-xml#819

Signed-off-by: David Thompson <davthomp@redhat.com>
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in IDE Cloudaptors Jan 8, 2023
@angelozerr angelozerr added this to the 0.24.0 milestone Jan 8, 2023
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
Archived in project
2 participants