Re: XMLC breaking lines?

Jacob Kjome <[email protected]> Wed, 21 Jan 2004 18:45:11 +0000
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
The fix for the breaking lines is in CVS.  I have been waiting on David Li to
make the actual pretty printing work better when it is enabled.  David is also
looking into a couple other reported issues.  It is entirely possible to release
the current CVS pretty much as-is, though and make further fixes in future
releases.  I can look into this tonight if need be.

Jake

Quoting Christian Cryder <[email protected]>:

> Jake, Alfred,
> 
> Any idea if we ever got this fix applied to XMLC?
> 
> Christian
> ----------------------------------------------
> Christian Cryder
> Internet Architect, ATMReports.com
> Project Chair, BarracudaMVC - http://barracudamvc.org
> ----------------------------------------------
> "Coffee? I could quit anytime, just not today"
> 
> 
> -----Original Message-----
> From: Jacob Kjome [mailto:[email protected]]
> Sent: Thursday, December 04, 2003 12:40 AM
> To: Christian Cryder
> Subject: RE: Xmlc: XMLC breaking lines?
> 
> 
> Hi Christian,
> 
> So, did reverting to 2.2.1 work for you?  It should have.  We'll try to get
> a 2.2.4 out with fixed pretty printing behavior (and make sure it doesn't
> affect non-pretty printed output).
> 
> Jake
> 
> At 11:55 PM 12/2/2003 -0600, Jacob Kjome wrote:
> 
> >Ok, the basic fix is on line 217...
> >
> >from this...
> >
> >     if (fNextSiblingText) {
> >             fOut.write('\n');
> >     } // end of if ()
> >
> >to this...
> >
> >     if (fPrettyPrinting && fNextSiblingText) {
> >             fOut.write('\n');
> >     } // end of if ()
> >
> >That fixes Christian's immediate issue and allows for output identical to
> >that in 2.2.1 (identical code needs applying in XMLFormatter).  However,
> >that still doesn't provide perfect output of Christian's document when
> >having pretty printing turned on.  There are some extra line breaks and
> >white space that shouldn't be there.  Something else needs to be tweaked.
> >
> >Attached is a zip file containing the output of Christian's page after the
> >above fix was applied and with pretty printing turned on, with  an indent
> >size of 2 spaces.  Things don't look quite perfect.  No reason it couldn't
> >be since we have full control over the output.
> >
> >Jake
> >
> >At 10:48 PM 12/2/2003 -0600, Jacob Kjome wrote:
> >
> >>Yep, just verified.  The problem is with HTMLFormatter when pretty
> >>printing was added in version 1.4.  1.3 is tagged as belonging to the
> >>2.2.1 release.  Here's the diff...
> >>
> >>http://cvs.forge.objectweb.org/cgi-bin/cvsweb.cgi/xmlc/xmlc/modules/xmlc/s
> rc/org/enhydra/xml/io/HTMLFormatter.java.diff?r1=1.3&r2=1.4&cvsroot=xmlc
> >>
> >>David, any chance you can fix that up?  Probably have to do the same
> >>thing to XMLFormatter (maybe?).  I'm heading to bed here soon, so I won't
> >>be able to work on it much tonight and won't get back to it until
> >>tomorrow night.
> >>
> >>I'm attaching text output from 2.2.1 and 2.2.2 in a zip file so you can
> >>see the difference.  I just tested this stuff in the Tomcat app, since it
> >>is easy enough to just drop in and test.  Note that the test was not
> >>performed with pretty printing enabled.  The issue is that the pretty
> >>printing code is affecting normal output even when not enabled.
> >>
> >>Jake
> >>
> >>At 10:00 PM 12/2/2003 -0600, Jacob Kjome wrote:
> >>
> >>>Ug.
> >>>
> >>>Ok, Christian, you are correct.  If you downgrade to 2.2.1, you should
> >>>get the behavior you expect.  We messed up something in 2.2.2.  It
> >>>probably has something to do with the pretty printing stuff that was
> >>>enabled.  Seems to be affecting non-pretty printed code.  Time to
> investigate.
> >>>
> >>>Christian, if you can verify that 2.2.1 works for you, that would be
> great.
> >>>
> >>>Jake
> >>>
> >>>At 02:14 PM 12/2/2003 -0500, Christian Cryder wrote:
> >>>>Just as an addendum, using DefaultDOMWriter this way means that it is
> >>>>getting created with the following output options:
> >>>>
> >>>>     OutputOptions doo = DOMFormatter.getDefaultOutputOptions(doc);
> >>>>     doo.setPublicId(DEFAULT_OO_PUBLIC_ID);
> >>>>     doo.setSystemId(DEFAULT_OO_SYSTEM_ID);
> >>>>
> >>>>Christian
> >>>>----------------------------------------------
> >>>>Christian Cryder
> >>>>Internet Architect, ATMReports.com
> >>>>Project Chair, BarracudaMVC - http://barracudamvc.org
> >>>>----------------------------------------------
> >>>>"Coffee? I could quit anytime, just not today"
> >>>>
> >>>>
> >>>> > -----Original Message-----
> >>>> > From: Christian Cryder [mailto:[email protected]]
> >>>> > Sent: Tuesday, December 02, 2003 2:13 PM
> >>>> > To: David Li [[email protected]]; Jacob Kjome
> >>>> > Subject: FW: Xmlc: XMLC breaking lines?
> >>>> >
> >>>> >
> >>>> > Hi David,
> >>>> >
> >>>> > No pretty printing is not turned on. I am attaching a copy of the
> >>>> > markup template. Search for 'Foo' and you will see the code in
> question:
> >>>> >
> >>>> >     <th class="page_links">&nbsp;
> >>>> >         <span
> class="Dir::Get_Data.PageModel.PageLinks">...(snipped)...
> >>>> >         </span>
> >>>> >         <span>Foo</span>Bar<span>Rama</span>
> >>>> >     </th>
> >>>> >
> >>>> > I am also attaching the generated XMLC file (.java) - from what I
> >>>> > can tell, it looks correct to me.
> >>>> >
> >>>> > My guess is that it has something to do with the outputting of
> >>>> > the DOM. I am using DefaultDOMWriter, configurred like this:
> >>>> >
> >>>> >     <object
> >>>> class="org.enhydra.barracuda.core.util.dom.DefaultDOMWriter">
> >>>> >         <prop name="DEFAULT_OO_PUBLIC_ID">-//W3C//DTD HTML 4.01
> >>>> > Transitional//EN</prop>
> >>>> >         <prop
> >>>> >
> name="DEFAULT_OO_SYSTEM_ID">http://www.w3.org/TR/html4/loose.dtd</prop>
> >>>> >     </object>
> >>>> >
> >>>> > That's pretty much it. Any suggestions would be greatly appreciated.
> >>>> >
> >>>> > tia,
> >>>> > Christian
> >>>> > ----------------------------------------------
> >>>> > Christian Cryder
> >>>> > Internet Architect, ATMReports.com
> >>>> > Project Chair, BarracudaMVC - http://barracudamvc.org
> >>>> > ----------------------------------------------
> >>>> > "Coffee? I could quit anytime, just not today"
> >>>> >
> >>>> >
> >>>> > > -----Original Message-----
> >>>> > > From: [email protected] [mailto:[email protected]]On
> >>>> Behalf Of
> >>>> > > David Li
> >>>> > > Sent: Monday, December 01, 2003 9:49 PM
> >>>> > > To: [email protected]
> >>>> > > Subject: Re: Xmlc: XMLC breaking lines?
> >>>> > >
> >>>> > >
> >>>> > > Do you have pretty printing turn on? Could you send me your file so
> I
> >>>> > > can test it? Thanks.
> >>>> > >
> >>>> > > David
> >>>> > >
> >>>> > > On Dec 2, 2003, at 2:04 AM, Christian Cryder wrote:
> >>>> > >
> >>>> > > > Hey folks,
> >>>> > > >
> >>>> > > > Does anyone know if something has happened within XMLC recently
> that
> >>>> > > > would
> >>>> > > > cause the following behavior? I have this line in my template
> >>>> (all on
> >>>> > > > one
> >>>> > > > line):
> >>>> > > >
> >>>> > > >         <span>Foo</span>Bar<span>Rama</span>
> >>>> > > >
> >>>> > > > And when XMLC compiles it, it breaks it into 2 lines, like this
> >>>> > > >         <span>Foo</span>Bar
> >>>> > > > <span>Rama</span>
> >>>> > > >
> >>>> > > > This effectively introduces a space in the resulting markup, and
> >>>> > > > that's not
> >>>> > > > good.
> >>>> > > >
> >>>> > > > Any suggestions here? I am almost positive this behavior only
> >>>> started
> >>>> > > > recently (within the last month or two).
> >>>> > > >
> >>>> > > > Christian
> >>>> > > > ----------------------------------------------
> >>>> > > > Christian Cryder
> >>>> > > > Internet Architect, ATMReports.com
> >>>> > > > Project Chair, BarracudaMVC - http://barracudamvc.org
> >>>> > > > ----------------------------------------------
> >>>> > > > "Coffee? I could quit anytime, just not today"
> >>>> > > >
> >>>> > > > _______________________________________________
> >>>> > > > XMLC mailing list
> >>>> > > > [email protected]
> >>>> > > > http://www.enhydra.org/mailman/listinfo.cgi/xmlc
> >>>> > >
> >>>> > > _______________________________________________
> >>>> > > XMLC mailing list
> >>>> > > [email protected]
> >>>> > > http://www.enhydra.org/mailman/listinfo.cgi/xmlc
> >>
> >
> >
> 
> _______________________________________________
> Barracuda mailing list
> [email protected]
> http://barracudamvc.org/lists/listinfo/barracuda