I would like to introduce a printer package implementing XML/HTML/XHTML
printing with DOM and SAX interfaces.

The ability to print XML documents in these three generic formats should
be the reponsibility of the parser package. The DOMWriter and SAXWriter
in the samples directory do not implement sufficient functionality and
are not packaged by default with the parser.


The following functionality is implemented currently:

* XML, HTML and XHTML output methods

* SAX and DOM interfaces

* Factory class and reusable printer implementation

* Support for controlling output format using XSLT-style OutputFormat
object

* Support for indentation format (pretty printing and line wrapping)

* Support for designating elements that should print as CDATA sections
or unescaped

* Determine document type to print from either document (DOM Level 2) or
OutputFormat

* Determine output method based on document type


Features not currently implemented:

* Some HTML attributes should not be escaped (e.g. URLs and scripts)

* Better support for various encoding formats

* Media type specification not reflected in HTML <META> tag

* Document type identifiers not retrieved from document (requires DOM
Level 2)

* Output method does not detect HTMLDocument (requires HTML DOM)


The source files are attached under the org.apache.xerces.printer
package. All printers are derived from BasePrinter which implements
basic functionality, pretty printing, and a reusable printer (same
printer can be reused with different documents, format). Printer
implements a simple factory. OutputFormat is used to specify non-default
format settings.


arkin 


-- 
____________________________________________________________
Assaf Arkin                               [EMAIL PROTECTED]
CTO                                  http://www.exoffice.com
Exoffice, The ExoLab Company             tel: (650) 259-9796

<<attachment: printer.zip>>

Reply via email to