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

CodeAction for cvc-complex-type.2.4.b: "insert all expected" vs. "insert all possible" #1255

Closed
GitMensch opened this issue Jul 20, 2022 · 3 comments · Fixed by #1257
Closed
Assignees
Labels
CM Extension Content Model extension (XML Schema & DTD) code action enhancement New feature or request
Milestone

Comments

@GitMensch
Copy link
Contributor

the code action says "Insert all expected elements" - but it also inserts elements with "minOccurs="0" maxOccurs="1" --> so also optional elements (and then complains that those have an invalid data type, manually deleting those lead to a warning free xml) -> can you split this into two actions "insert all expected" and "insert all possible"?

Originally posted by @GitMensch in #1218 (comment)

@angelozerr
Copy link
Contributor

Could you give us a very simple ml and xsd for this issue. We could use them for tests.

Thanks!

@GitMensch
Copy link
Contributor Author

Not complete but possibly enough:

	<xs:element name="cmplx">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="a" minOccurs="1" maxOccurs="1"/>
				<xs:element name="b" minOccurs="0" maxOccurs="1"/>
				<xs:element name="c" minOccurs="0" maxOccurs="1"/>
				<xs:element name="d" minOccurs="1" maxOccurs="1"/>
				<xs:element name="e" minOccurs="1" maxOccurs="1"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>

and

	<cmplx>
	</cmplx>

@JessicaJHee
Copy link
Contributor

I'm interested in this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CM Extension Content Model extension (XML Schema & DTD) code action enhancement New feature or request
Projects
None yet
4 participants