Skip to content

Commit

Permalink
Merge pull request #12 from klausboeing/standaloneNoPresentAttributeM…
Browse files Browse the repository at this point in the history
…aster

fix to write when standaloneSet - v4.1
  • Loading branch information
cowtowncoder committed Apr 16, 2019
2 parents 3b3bb3c + e965081 commit b6bc29b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/org/codehaus/stax2/ri/Stax2EventWriterImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ public void add(XMLEvent event)
StartDocument sd = (StartDocument) event;
if (!sd.encodingSet()) { // encoding defined?
_writer.writeStartDocument(sd.getVersion());
} else if (sd.standaloneSet()) {
_writer.writeStartDocument(sd.getVersion(), sd.getCharacterEncodingScheme(), sd.isStandalone());
} else {
_writer.writeStartDocument(sd.getCharacterEncodingScheme(),
sd.getVersion());
Expand Down

0 comments on commit b6bc29b

Please sign in to comment.