redhat-developer / redhat-developer/vscode-xml

Cyclic definition in XSD schema produces an error

Open
#931 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug validation xsd
Dominant language
TypeScript
Stars
328
Forks
101
Avg merge
1d 17h
Merged PRs (30d)
7

Description

Assume the following example:

<?xml version='1.0' encoding='UTF-8'?>
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'
    xmlns:myns='http://example.com/schemas/myns'
    targetNamespace='http://example.com/schemas/myns'
    elementFormDefault='unqualified'>

    <xs:complexType name='A'>
        <xs:sequence>
            <xs:element name="error" type="AList" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name='AList'>
        <xs:sequence>
            <xs:element name="values" type='A' minOccurs='0' maxOccurs='unbounded' />
        </xs:sequence>
    </xs:complexType>

</xs:schema>

Will give src-resolve: Cannot resolve the name 'AList' to a(n) 'type definition' component.xsd(src-resolve)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported XSD example and trace the XML schema type-resolution path that emits the src-resolve error. Done means the cyclic A and AList definitions resolve without that error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.