Skip to content
This repository was archived by the owner on Mar 25, 2020. It is now read-only.
This repository was archived by the owner on Mar 25, 2020. It is now read-only.

Sequence constraint not honored for autocompletion #24

@HandOfGod94

Description

@HandOfGod94

Describe the bug
The completion suggestion is listing all the suggestions for a give parent, and is not honoring the
sequence in the elements should occur. The users gets notification after they modify the documet

To Reproduce
Steps to reproduce the behavior:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans 
       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
       http://www.springframework.org/schema/context 
       http://www.springframework.org/schema/context/spring-context-2.5.xsd
       http://camel.apache.org/schema/spring 
       http://camel.apache.org/schema/spring/camel-spring.xsd">

  <camelContext xmlns="http://camel.apache.org/schema/spring">
    <route>
      <from uri="seda:foo"/>
      <to uri="mock:results"/>
    </route>
  </camelContext>
</beans>
  1. Open VSCode with attached XML
  2. List down element suggestion after line 17 by typing <.
  3. Select export element and add uri parameter to it since its required.
  4. It throws an cvc error.

Expected behavior
It should not list export if it's after route element as per XSD, since it has to honor xsd:sequence.

Screenshots

  • Wrong suggestions in autocomplete
    image

Desktop (please complete the following information):

  • OS : Windows
  • Editor : VSCode
  • Editor Version : 1.28.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority: lowwontfixThis will not be worked on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions