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

Code action cvc_complex_type_2_4_b fails when child elements are of complex type #1278

Open
JessicaJHee opened this issue Aug 17, 2022 · 0 comments
Labels
bug Something isn't working code action

Comments

@JessicaJHee
Copy link
Contributor

JessicaJHee commented Aug 17, 2022

There are some issues with this code action in the cases where the child element has no type or complex definition, such as element 'a' in the following example. (ex: no type="xs:string" or <xs:complexType> ... </xs:complexType> inside the element definition).

With the following definition file:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:element name="root">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="a" minOccurs="1" maxOccurs="1" />
				<xs:element name="b" minOccurs="0" maxOccurs="1" type="xs:string" />
				<xs:element name="c" minOccurs="0" maxOccurs="1" type="xs:string" />
				<xs:element name="d" minOccurs="1" maxOccurs="1">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="d1" minOccurs="0" maxOccurs="unbounded" type="xs:string" />
						</xs:sequence>
						<xs:attribute name="status" type="xs:string" />
						<xs:attribute name="age" use="required" type="xs:int" />
					</xs:complexType>
				</xs:element>
				<xs:element name="e" minOccurs="1" maxOccurs="1" type="xs:string" />
			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>

Peek 2022-08-17 15-33

The elements inserted are incorrect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working code action
Projects
None yet
Development

No branches or pull requests

2 participants