Skip Menu |

This queue is for tickets about the XML-Parser CPAN distribution.

Report information
The Basics
Id: 102535
Status: resolved
Priority: 0/
Queue: XML-Parser

People
Owner: Nobody in particular
Requestors: RSAVAGE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.44
Fixed in: (no value)



Subject: XMLDecl ignores standalone
SVG file (is UTF8): <?xml version="1.0" encoding="UTF-8" standalone="no"?> Perl: sub handle_xml_declaration { my($expat, @attributes) = @_; print STDERR 'XML: ', join(', ', map{defined($_) ? $_ : '! defined'} @attributes), '.'; ... } Output: XML: 1.0, UTF-8, .
The documentation states that "Standalone will be either true, false, or undefined if the standalone attribute is yes, no, or not made respectively." The code sample provided indicates its returning an empty string which *is* a false value. I don't see standalone being "ignored" in this case. Hope that helps, Russell. .. who is attempting to clean up the XML::Parser issues thanks to the #CPANPR challenge.
Subject: Re: [rt.cpan.org #102535] XMLDecl ignores standalone
Date: Fri, 17 Apr 2015 16:08:17 +1000
To: bug-XML-Parser [...] rt.cpan.org
From: Ron Savage <ron [...] savage.net.au>
Hi Russell Thanx for taking an interest in this. However, I must reject your argument. I expect the returned value to be 'yes', 'no' (both obvious) or '' (or perhaps undef, but I hope not - see below) if not specified. Anything else I regard as a bug. Hence my report. The use of undef can cause pain (i.e. a warning) when printing strings as I did in the demo, so I don't want to see it implemented. On 17/04/15 14:10, Russell Jenkins via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=102535 > > > The documentation states that > "Standalone will be either true, false, or undefined if the standalone attribute is yes, no, or not made respectively." > > The code sample provided indicates its returning an empty string which *is* a false value. I don't see standalone being "ignored" in this case. > > Hope that helps, > Russell. > .. who is attempting to clean up the XML::Parser issues thanks to the #CPANPR challenge. >
-- Ron Savage - savage.net.au
Ticket migrated to github as https://github.com/toddr/XML-Parser/issues/73