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

Completion for prefix of attribute name #1133

Closed
dev-bz opened this issue Dec 7, 2021 · 1 comment · Fixed by #1191
Closed

Completion for prefix of attribute name #1133

dev-bz opened this issue Dec 7, 2021 · 1 comment · Fixed by #1191
Labels
bug Something isn't working completion This issue or enhancement is related to completion support
Milestone

Comments

@dev-bz
Copy link

dev-bz commented Dec 7, 2021

When editing a XML file, the tag name have complete with prefix but attribute name is missing its prefix. Pls make it better.

<!-- other.xsd -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="test-attrs">
	<xs:attribute name="label" type="xs:string"/>
</xs:schema>
<!-- sample.xsd -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:test="test-attrs">
	<xs:import schemaLocation="other.xsd" namespace="test-attrs"/>
	<xs:element name="sample">
		<xs:complexType>
		<xs:attribute ref="test:label"/>
		</xs:complexType>
	</xs:element>
</xs:schema>
<!-- sample.xml (✘error version) -->
<sample xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:test="test-attrs" xsi:noNamespaceSchemaLocation="sample.xsd"
	label="sample"/>
<!-- sample.xml (✔correct version) -->
<sample xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:test="test-attrs" xsi:noNamespaceSchemaLocation="sample.xsd"
	test:label="sample"/>
@angelozerr angelozerr added bug Something isn't working completion This issue or enhancement is related to completion support labels Dec 7, 2021
angelozerr pushed a commit to angelozerr/lemminx that referenced this issue Mar 26, 2022
Fixes eclipse#1133

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/lemminx that referenced this issue Mar 26, 2022
Fixes eclipse#1133

Signed-off-by: azerr <azerr@redhat.com>
@angelozerr angelozerr added this to the 0.19.2 milestone Mar 26, 2022
@angelozerr
Copy link
Contributor

@dev-bz I'm fixing your issue, see demo at #1191 (comment)

angelozerr pushed a commit to angelozerr/lemminx that referenced this issue Mar 27, 2022
Fixes eclipse#1133

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit that referenced this issue Mar 28, 2022
Fixes #1133

Signed-off-by: azerr <azerr@redhat.com>
@angelozerr angelozerr added enhancement New feature or request and removed enhancement New feature or request labels Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working completion This issue or enhancement is related to completion support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants