Skip to content

Completion Broken When Encountering xs:any #927

Open
@BellCubeDev

Description

@BellCubeDev

Reminiscent of #177, it appears that on versions 0.26.1 (stable) and 0.26.2023080404 (pre-release), schema-based completion is broken when an xs:any element is encountered. Instead of showing explicitly-defined elements, it only shows the root tag as an option.

Summary

For a visual demonstration and a reproduction case, skip this header and continue to the detail/summary blocks.

When an xs:any schema element is present, the following is true:

The following features are working:

  • Validation
  • Documentation On Hover
  • Attribute Suggestion

The following feature is NOT working:

  • Tag Suggestion

Demo & Minimal Reproduction XSD

<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="root">
        <xs:annotation><xs:documentation>Some documentation for the ROOT ELEMENT</xs:documentation></xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:any minOccurs="0" processContents="skip" />
                <xs:element name="Name" minOccurs="0" maxOccurs="1" type="xs:string">
                    <xs:annotation><xs:documentation>Some documentation for the NAME ELEMENT</xs:documentation></xs:annotation>
                </xs:element>
                <xs:element name="Id" minOccurs="0" maxOccurs="1">
                    <xs:annotation><xs:documentation>Some documentation for the ID ELEMENT</xs:documentation></xs:annotation>
                    <xs:complexType>
                        <xs:simpleContent>
                            <xs:extension base="xs:integer">
                                <xs:attribute name="type" type="xs:string" />
                            </xs:extension>
                        </xs:simpleContent>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>

Scope of Issue (w/ Images) Using Above XSD

Documentation works on root eement

IntelliSense only shows root element for completion

image

Created element uses type for root element

image

Explicitly-defined elements still have their types applied

image
image

Validation is working

image
image


🔴🎩


Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions