AW: [jdom-interest] Issues with XMLOutputter

Frank Spychalski psycho at sitewaerts.de
Tue Sep 18 01:51:35 PDT 2001


Hi,
sorry, I didn't find Alex Chaffe's list of improvements, so I cannot comment
on that but I agree with the original mail. I had to write a subclass of
XMLOutputter, too, to change the handling of
<?javax.xml.transform.disable-output-escaping?>...

Writing a subclass of the XMLOutputter would be alot easier if the variables
which hold the configuration would be protected instead of private.

bye
Frank

> -----Ursprüngliche Nachricht-----
> Von: jdom-interest-admin at jdom.org
> [mailto:jdom-interest-admin at jdom.org]Im Auftrag von
> philip.nelson at omniresources.com
> Gesendet: Dienstag, 18. September 2001 02:06
> An: gb at opengroup.org; jdom-interest at jdom.org
> Betreff: RE: [jdom-interest] Issues with XMLOutputter
> 
> 
> Look back in the archives, possibly in July.  Alex Chaffe had 
> a whole list
> of improvements to XMLOutputter proposed but I don't remember 
> what they
> were.  
> 
> Of course, I don't know where Alex is either...
> 
> > -----Original Message-----
> > From: Gary Bentley [mailto:gb at opengroup.org]
> > Sent: Monday, September 17, 2001 4:03 AM
> > To: jdom-interest at jdom.org
> > Subject: [jdom-interest] Issues with XMLOutputter
> > 
> > 
> > Hi folks,
> > 
> > I am currently writing a subclass of XMLOutputter and I have a few 
> > queries/issues with it:
> > 
> > 	1.  The actual indent used is not available...should I 
> > use indent ()?
> > 
> > 	2.  The doIndent variable is not available...should I 
> > use indent()?
> > 
> > 	3.  The expandEmptyElements variable is not 
> > available...if I override
> > 	     printElement how do I know whether to expand empty 
> > elements?
> > 
> > 	4.  The textNormalize variable is not available...does 
> > this matter for
> > 	     printing out the content of an element?
> > 
> > 	5.  It would be really useful to have printAttributes 
> > take in the indent
> > 	     level since then you could "prettify" the 
> > attributes...i.e. not have to
> > 	     print them on a single line, my personal 
> > preference for prettied
> > 	     attributes is:
> > 
> > 		<test a="hello"
> > 		        b="hi there" />
> > 
> > 	     Since this would probably break existing 
> > applications a new method
> > 	     protected int getIndentLevel () would probably be 
> > better...or make the
> > 	     indentLevel int protected.
> > 
> > 	6.  If would be very useful to have a printContent that 
> > would handle the
> > 	    printing of a object...i.e. so that I don't have to 
> > handle each type of
> > 	    content explicitly in the printElement method, it 
> > could throw an
> > 	    IllegalArgumentException if you passed the wrong type.
> > 
> > 	    So you would pass it an Object, which would be a 
> > CDATA, Element
> > 	    etc...and it would then call the relevant method...i.e.
> > 
> > 		if (Object instanceof CDATA)
> > 		{
> > 
> > 		     printCDATA ...
> > 
> > 		}
> > 
> > 	7.  Who handles the new lines?  i.e. should I have to 
> > worry about it?
> > 	     Especially if I override printElement?  i.e. when 
> > I close off the
> > 	     tag with > should I put on a new line before 
> > calling printX.  Since
> > 	     the newlines boolean is not available how do I 
> > know whether to?
> > 
> > 	8.  When is printElement (without List) called as 
> > opposed to printElement
> > 	     with the content List?
> > 
> > 	9.  I presume printString is used for printing the 
> > actual content of the
> > 	     element, i.e. the textual content, is this 
> > correct?  So I would use:
> > 
> > 		printString (Element.getText ());
> > 
> > 	     How does tie in with the normalizing of text? 	     
> > 
> > 	10. If I override printElement effectively I am taking 
> > control of the whole
> > 	     tree walk...is this true?  If so, having the 
> > variables available becomes
> > 	     necessary...
> > 
> > Any and all thoughts on this would be appreciated...
> > 
> > Thanks,
> > 
> > Gary
> > 
> > -------------------------------------------------------
> > _______________________________________________
> > To control your jdom-interest membership:
> > http://lists.denveronline.net/mailman/options/jdom-interest/yo
> uraddr at yourhost.com
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/yo
uraddr at yourhost.com

<<<<<<<<<<<<<<<<<<<<<<<<<<<
sitewaerts GmbH
Hebelstraße 15
D-76133 Karlsruhe

Tel: +49 (721) 920 918 0
Fax: +49 (721) 920 918 29
http://www.sitewaerts.de
>>>>>>>>>>>>>>>>>>>>>>>>>>>





More information about the jdom-interest mailing list