forked from chorny/XML-Parser
-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Migrated from rt.cpan.org#102535 (status was 'open')
Requestors:
From [email protected] on 2015-03-05 21:57:15
:
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, .
From [email protected] on 2015-04-17 04:10:23
:
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.
From [email protected] on 2015-04-17 06:07:04
:
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:
> <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
Metadata
Metadata
Assignees
Labels
No labels