Skip to content

#53 add Transformers.Standalone to control the standalone attribute#321

Open
edmoffo wants to merge 1 commit into
yegor256:masterfrom
edmoffo:53-standalone
Open

#53 add Transformers.Standalone to control the standalone attribute#321
edmoffo wants to merge 1 commit into
yegor256:masterfrom
edmoffo:53-standalone

Conversation

@edmoffo

@edmoffo edmoffo commented Jun 19, 2026

Copy link
Copy Markdown

Adds a Transformers.Standalone factory so callers can ask the XML output to carry an explicit standalone="yes" or standalone="no" in the declaration. Until now neither Transformers.Document nor Transformers.Compact exposed that attribute, so the scenario from #53 (<?xml version="1.0" encoding="UTF-8" standalone="no"?>) was unreachable through the public API.

new Xembler(directives, new Transformers.Standalone(false)).xml() now produces a declaration with standalone="no", and Standalone(true) produces standalone="yes". Indentation and UTF-8 encoding match Transformers.Document so the rest of the output is unchanged.

Verified locally with mvn -Pqulice -Dhone.skip=true clean install: the build is green, Qulice has no violations, and the two new cases in TransformersTest pass alongside the existing six tests.

Closes #53

…tion

Lets callers ask the XML output to carry standalone="yes" or
standalone="no" in the declaration, which has been unreachable through
the existing Transformers.Document and Transformers.Compact factories.

Closes yegor256#53
@sonarqubecloud

Copy link
Copy Markdown

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.

standalone=no

1 participant