libxml-raku / LibXML-raku

Raku bindings to the libxml2 native library
Artistic License 2.0
11 stars 5 forks source link

Standalone mixup #37

Closed jnthn closed 4 years ago

jnthn commented 4 years ago

Given this:

my LibXML::Document $doc .= new: :version('1.0'), :enc('UTF-8');
$doc.setStandalone(LibXML::Document::XmlStandaloneNo);
my LibXML::Element $root = $doc.createElement('Types');
$root.setNamespace('http://schemas.openxmlformats.org/package/2006/content-types');
$doc.setDocumentElement($root);

I get:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"/>

Whereas if I use LibXML::Document::XmlStandaloneYes then it emits:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"/>

I'm guessing this isn't intended. :-)

dwarring commented 4 years ago

No definitely wasn't