xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Boag/CAM/Lotus" <Scott_B...@lotus.com>
Subject Re: Formatting XML and XSL output ?
Date Mon, 10 Jan 2000 15:02:10 GMT

Thanks, yep, the fact that it isn't there is an oversight.  However, I
don't want to put too much effort into FormatterToXML, etc., as they will
be replaced by Assaf's Serializer classes.

BTW, you should use <xsl:output indent="yes"/> to control indenting... it's
really normally the stylesheet that should control indenting.  There is no
way in xslt to control the indent amount though.

-scott




                                                                                         
                             
                    "Georg Seipler"                                                      
                             
                    <geseit01@fht-ess        To:     <general@xml.apache.org>   
                                      
                    lingen.de>               cc:     (bcc: Scott Boag/CAM/Lotus)      
                                
                                             Subject:     Re: Formatting XML and XSL output
?                          
                    01/10/00 06:17 AM                                                    
                             
                    Please respond to                                                    
                             
                    general                                                              
                             
                                                                                         
                             
                                                                                         
                             




Hi again ...

Answering my own question (for those with similar problems):

> How do I get an indented (pretty-printed) output ?

Derive from FormatterToXML and modify the settings, such as:

// inner class: formatter for xml with indentation of 2 spaces
class MyFormatterToXML extends FormatterToXML {
  MyFormatterToXML(java.io.Writer writer) {
    super(writer); this.indent = 2; this.m_doIndent = true;
  }
}

This is a design issue, I know, but I'd rather like according set/get
methods for indentation. Perhaps in a future version of xalan ?

Greetings,
Georg Seipler
(geseit01@fht-esslingen.de)







Mime
View raw message