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

Add tests for grammarAwareFormatting setting #1364

Merged
merged 1 commit into from
Nov 11, 2022

Conversation

JessicaJHee
Copy link
Contributor

Signed-off-by: Jessica He jhe@redhat.com

@angelozerr
Copy link
Contributor

angelozerr commented Nov 10, 2022

@JessicaJHee it should be nice to have the same test for DTD and XSD and for method name you use the same for test in XSD and DTD test.

I suggest that you replace the foo.dtd with foo-mixed.dtd and your XSD file name with foo-mixed.xsd. Those DTD and XSD should have the same grammar rule.

@angelozerr
Copy link
Contributor

@angelozerr
Copy link
Contributor

angelozerr commented Nov 10, 2022

It should be nice too to support RelaxNG test too (one test foor RlaxNF XML syntax and one test for RelaxNG compact syntax). I wil try to implement

CMRelaxNGElementDeclaration

like this:

public boolean isMixedContent() {
	return pattern.getContentType() == Pattern.MIXED_CONTENT_TYPE;
}

To implement isStringType, we need to study how it works.

It seems that you need to use mixed in the grammar:

Signed-off-by: Jessica He <jhe@redhat.com>
@angelozerr
Copy link
Contributor

LGTM. Thanks @JessicaJHee

@angelozerr angelozerr merged commit 09b3f49 into eclipse:main Nov 11, 2022
@angelozerr angelozerr added this to the 0.23.0 milestone Nov 11, 2022
@angelozerr
Copy link
Contributor

@enxio this PR fixes some little bug with experimental formatter. Please re-install vscode-xml prerelease if you wish to continue to test experimental formatter.

@JessicaJHee JessicaJHee deleted the add-grammar-aware-tests branch November 14, 2022 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants