Skip Menu |
 

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

Report information
The Basics
Id: 18609
Status: resolved
Priority: 0/
Queue: XML-Generator

People
Owner: BHOLZMAN [...] cpan.org
Requestors: schroeer [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.99
Fixed in: (no value)



Subject: cdata also pretty-printed
Download (untitled) / with headers
text/plain 738b
Contrary to what the manual page states, cdata sections are also idented when pretty-printing is turned on. I find this disturbing when operating with multi-line text. Example: #!/usr/bin/perl -w use strict; use XML::Generator (); my $gen = XML::Generator->new(pretty => 2); print $gen->foo($gen->bar("This is a text with newlines.\nHere is line two.\nThis is the third line.")); print $gen->foo($gen->bar($gen->xmlcdata("This is a text with newlines.\nHere is line two.\nThis is the third line."))); __END__ prints: <foo> <bar>This is a text with newlines. Here is line two. This is the third line.</bar> </foo><foo> <bar><![CDATA[This is a text with newlines. Here is line two. This is the third line.]]></bar> </foo>
Download (untitled) / with headers
text/plain 337b
On Sa. 08. Apr. 2006, 19:11:56, guest wrote: Show quoted text
> <foo> > <bar>This is a text with newlines. > Here is line two. > This is the third line.</bar> > </foo><foo> > <bar><![CDATA[This is a text with newlines. > Here is line two. > This is the third line.]]></bar> > </foo>
Of course it cannot be seen here... The lines are idented.
Subject: Re: [rt.cpan.org #18609] cdata also pretty-printed
Date: Mon, 10 Apr 2006 08:53:54 -0400
To: <bug-XML-Generator [...] rt.cpan.org>
From: "Benjamin Holzman" <bholzman [...] earthlink.net>
Download (untitled) / with headers
text/plain 834b
Wow, that's not right at all. At least the documentation is right... Thanks for the bug report; I knew there was a reason I was waiting to release a 1.0 version... Show quoted text
----- Original Message ----- From: "Guest via RT" <bug-XML-Generator@rt.cpan.org> To: <undisclosed-recipients:> Sent: Saturday, April 08, 2006 7:13 PM Subject: [rt.cpan.org #18609] cdata also pretty-printed
> > Queue: XML-Generator > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=18609 > > > On Sa. 08. Apr. 2006, 19:11:56, guest wrote:
>> <foo> >> <bar>This is a text with newlines. >> Here is line two. >> This is the third line.</bar> >> </foo><foo> >> <bar><![CDATA[This is a text with newlines. >> Here is line two. >> This is the third line.]]></bar> >> </foo>
> > Of course it cannot be seen here... The lines are idented. >
From: schroeer [...] lmu.de
Download (untitled) / with headers
text/plain 1.3k
Hello again, do you see a way to get this fixed within the near future? I took a quick look, and I understand that Generator's recursive way of creating the output is not going to make it easy. I really need to preserve white space in text nodes. But without identing and formatting, XML seems to be no better than any binary format for me. Can anyone recommend another module that does the job? Cheers Daniel On Mo. 10. Apr. 2006, 08:54:58, bholzman@earthlink.net wrote: Show quoted text
> Wow, that's not right at all. At least the documentation is right... > > Thanks for the bug report; I knew there was a reason I was waiting to > release a 1.0 version... > > > ----- Original Message ----- > From: "Guest via RT" <bug-XML-Generator@rt.cpan.org> > To: <undisclosed-recipients:> > Sent: Saturday, April 08, 2006 7:13 PM > Subject: [rt.cpan.org #18609] cdata also pretty-printed > >
> > > > Queue: XML-Generator > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=18609 > > > > > On Sa. 08. Apr. 2006, 19:11:56, guest wrote:
> >> <foo> > >> <bar>This is a text with newlines. > >> Here is line two. > >> This is the third line.</bar> > >> </foo><foo> > >> <bar><![CDATA[This is a text with newlines. > >> Here is line two. > >> This is the third line.]]></bar> > >> </foo>
> > > > Of course it cannot be seen here... The lines are idented. > >
> >
Subject: Re: [rt.cpan.org #18609] cdata also pretty-printed
Date: Wed, 10 May 2006 15:03:09 -0400 (GMT-04:00)
To: bug-XML-Generator [...] rt.cpan.org
From: bholzman [...] earthlink.net
Download (untitled) / with headers
text/plain 2.1k
Daniel, Yes, it is not trivial, but I am pretty sure I will be able to make it work. However, I'm not sure of the time frame. It's quite a stupendous hack, but one thing you could do would be to insert a token ("CDATA_GOES_HERE" or somesuch) instead of the cdata when generating the XML, convert it to a string, and then use a substitution to replace the token with the cdata. Not elegant, but it should work. Ben Show quoted text
-----Original Message-----
>From: Daniel Schr�er via RT <bug-XML-Generator@rt.cpan.org> >Sent: May 9, 2006 7:29 AM >To: undisclosed-recipients@null, null@null >Subject: [rt.cpan.org #18609] cdata also pretty-printed > > > Queue: XML-Generator > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=18609 > > >Hello again, > >do you see a way to get this fixed within the near future? I took a >quick look, and I understand that Generator's recursive way of creating >the output is not going to make it easy. > >I really need to preserve white space in text nodes. But without >identing and formatting, XML seems to be no better than any binary >format for me. Can anyone recommend another module that does the job? > >Cheers >Daniel > > On Mo. 10. Apr. 2006, 08:54:58, bholzman@earthlink.net wrote:
>> Wow, that's not right at all. At least the documentation is right... >> >> Thanks for the bug report; I knew there was a reason I was waiting to >> release a 1.0 version... >> >> >> ----- Original Message ----- >> From: "Guest via RT" <bug-XML-Generator@rt.cpan.org> >> To: <undisclosed-recipients:> >> Sent: Saturday, April 08, 2006 7:13 PM >> Subject: [rt.cpan.org #18609] cdata also pretty-printed >> >>
>> > >> > Queue: XML-Generator >> > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=18609 > >> > >> > On Sa. 08. Apr. 2006, 19:11:56, guest wrote:
>> >> <foo> >> >> <bar>This is a text with newlines. >> >> Here is line two. >> >> This is the third line.</bar> >> >> </foo><foo> >> >> <bar><![CDATA[This is a text with newlines. >> >> Here is line two. >> >> This is the third line.]]></bar> >> >> </foo>
>> > >> > Of course it cannot be seen here... The lines are idented. >> >
>> >>
> > >


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.