Skip Menu |

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

Report information
The Basics
Id: 21304
Status: resolved
Priority: 0/
Queue: Pod-XML

People
Owner: mattw [...] mattsscripts.co.uk
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.96
Fixed in: (no value)



Subject: Wrong entities in Pod::XML output
It seems that Pod::XML uses standard HTML entities for non-ASCII characters. This is not correct for XML output, as there are no entities predefined in XML (except lt,gt,amp and a few others). There are some solutions for this problem: * Do not use entities at all, but use characters in the encoding specified in the XML preamble; * Define all entities you are using; or * use numeric entities like &#196; or &#xff; I find the last solution the best and easiest. You can check XML validity with xmllint from libxml2. For example, this is the output from a Pod containing a lot of german umlauts (The tail +2 is necessary because of a bug reported before): $ pod2xml < /home/e/eserte/src/bbbike/doc/tests.pod | tail +2 | xmllint - -:18: parser error : Entity 'auml' not defined Progressbar w&auml;chst in vern&uuml;nftigen Schritten. ^ -:18: parser error : Entity 'uuml' not defined Progressbar w&auml;chst in vern&uuml;nftigen Schritten. ^ -:21: parser error : Entity 'ouml' not defined Hauptfenster &ouml;ffnet sich. Das Fenster sollte m&ouml;glichst gro&szlig; sein ^ -:21: parser error : Entity 'ouml' not defined ... Regards, Slaven
All done.
Subject: Re: [rt.cpan.org #21304] Resolved: Wrong entities in Pod::XML output
Date: 08 Sep 2006 01:11:34 +0200
To: bug-Pod-XML [...] rt.cpan.org
From: Slaven Rezic <slaven [...] rezic.de>
"Matt Wilson via RT" <bug-Pod-XML@rt.cpan.org> writes: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=21304 > > > According to our records, your request has been resolved. If you have any > further questions or concerns, please respond to this message. >
Unfortunately escaping of < and > does not work anymore. Consider the following Pod: =head1 AUTHOR Slaven Rezic <srezic@cpan.org> =cut Using pod2xml and validation with xmllint: $ pod2xml < /tmp/bla.pod | xmllint - -:9: parser error : error parsing attribute name Slaven Rezic <srezic@cpan.org> ^ -:9: parser error : attributes construct error Slaven Rezic <srezic@cpan.org> ^ -:9: parser error : Couldn't find end of Start Tag srezic line 9 Slaven Rezic <srezic@cpan.org> ^ Exit 1 Regards, Slaven -- Slaven Rezic - slaven <at> rezic <dot> de babybike - routeplanner for cyclists in Berlin handheld (e.g. Compaq iPAQ with Linux) version of bbbike http://bbbike.sourceforge.net
Should be all fixed now, including several potential bugs I discovered while investigating this one.