Advertisement
timlegge

Untitled

Apr 16th, 2023
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. diff --git a/lib/XML/Generator.pm b/lib/XML/Generator.pm
  2. index 808b703..6d4bfd3 100644
  3. --- a/lib/XML/Generator.pm
  4. +++ b/lib/XML/Generator.pm
  5. @@ -804,7 +804,7 @@ sub _xmldecl {
  6. # use it to create a <!DOCTYPE ...> and to indicate that this
  7. # document can't stand alone.
  8. my $doctype = $this->xmldtd($this->{xml_header}{dtd} // $this->{dtd});
  9. - my $standalone = $doctype ? "no" : "yes";
  10. + my $standalone;# = $doctype ? "no" : "yes";
  11.  
  12. for (my $i = 0; $i < $#args; $i += 2) {
  13. if ($args[$i] eq 'version' ) {
  14. @@ -818,6 +818,7 @@ sub _xmldecl {
  15. }
  16. }
  17.  
  18. + $standalone = "no" if $doctype;;
  19. $version = qq{ version="$version"} if defined $version;
  20. $encoding = qq{ encoding="$encoding"} if defined $encoding;
  21. $standalone = qq{ standalone="$standalone"} if defined $standalone;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement