OutputFormat is mostly just a configuration holder. Its the XMLWriter that
does all the real work. Taking a look at the code in XMLWriter, probably the
writeString(String) method is where the text trimming code could go.

So if OutputFormat had a new property, say 'lineWidth' or something, which
is -1 by default, then that could be used as a flag to determine if text
over a certain length should be trimmed over multiple lines.

James
----- Original Message -----
From: "Robert J. Lebowitz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 28, 2001 8:49 PM
Subject: Re: [dom4j-user] Pretty Printing feature


>
> Well... I've determined that the code in question is found in the
> PPrint.java class.
>
> Is OutputFormat simply a configuration holder class, or is it physically
> involved in structuring the character outputstream?
>
> Rob
> ----- Original Message -----
> From: "James Strachan" <[EMAIL PROTECTED]>
> To: "Robert J. Lebowitz" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Wednesday, November 28, 2001 3:42 AM
> Subject: Re: [dom4j-user] Pretty Printing feature
>
>
> > Hi Rob
> >
> > Great idea. I've added this to the TODO list so I'm sure one of us will
> dive
> > in and implement it at some point. As always, volunteers are more than
> > welcome.
> >
> > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dom4j/dom4j/
> >
> > (click on the version number next to TODO.txt to view its contents).
> >
> > James
> > ----- Original Message -----
> > From: "Robert J. Lebowitz" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, November 27, 2001 8:39 PM
> > Subject: [dom4j-user] Pretty Printing feature
> >
> >
> > > The .createPrettyPrint() method of OutputFormat is quite nice, but in
> > terms
> > > of readability within a standard text editor, it can be a bit of a
pain.
> > >
> > > Anytime you have a great deal of text between an element and it's end
> > > element, it is displayed as a single line.
> > >
> > > I use JTidy to clean up some of my documents and I've noticed that it
> has
> > a
> > > nice automatic line wrap feature to fit text within 80 spaces.
> > >
> > > I wonder if this feature can be added to the OutputFormat class by
> > borrowing
> > > the code from Jtidy?
> > >
> > > Rob
> > >
> > >
> > > _______________________________________________
> > > dom4j-user mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/dom4j-user
> > >
> >
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > _______________________________________________
> > dom4j-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/dom4j-user
>
>
> _______________________________________________
> dom4j-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/dom4j-user
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to