jaxg 0.1dev

org.xml.graphics
Interface XGProcessor

All Known Implementing Classes:
AbstractXGProcessor

public interface XGProcessor

The XGProcessor is the equivalent of the JAXP Transformer. It is only used for simple processing runs with XSL-FO documents. If you need to do XSLT, too, you should use the XGProcessorHandler.

If you want to listen to events happening during FO processing you can register listeners here.

This is the basic usage pattern of this interface:

 //Set up the XGProcessor 
 XGProcessorFactory factory = new SomeXGProcessorFactory();
 XGProcessor processor = factory.newXGProcessor();
       
 //Set up the source and target
 Source src = new StreamSource(new File("C:/temp/helloworld.fo"));
 XGResult fopres = new StreamXGResult("application/pdf", new File("C:/temp/out.pdf"));

 //Start the processing run
 processor.process(src, fopres);
 

Author:
Jeremias Maerki

Method Summary
 void addEventListener(XGEventListener listener)
           
 javax.xml.transform.URIResolver getURIResolver()
           
 void process(javax.xml.transform.Source source, XGResult result)
          Processes an XSL-FO document given by the source parameter into the requested output.
 void removeEventListener(XGEventListener listener)
           
 void setURIResolver(javax.xml.transform.URIResolver resolver)
           
 

Method Detail

addEventListener

void addEventListener(XGEventListener listener)

removeEventListener

void removeEventListener(XGEventListener listener)

setURIResolver

void setURIResolver(javax.xml.transform.URIResolver resolver)

getURIResolver

javax.xml.transform.URIResolver getURIResolver()

process

void process(javax.xml.transform.Source source,
             XGResult result)
             throws XGException
Processes an XSL-FO document given by the source parameter into the requested output.

Parameters:
source - A JAXP Source object specifying the source XSL-FO file.
result - A XGResult object defining the requested output document.
Throws:
javax.xml.transform.TransformerException - In case the transformation fails.
XGException

jaxg 0.1dev

Copyright © 2004-2005 Jeremias Märki. All rights reserved.