com.adobe.idml
Class PackageTransformer

java.lang.Object
  extended by com.adobe.idml.PackageTransformer
Direct Known Subclasses:
AddCatalogPages

public class PackageTransformer
extends java.lang.Object

Contains overloaded transform methods. This class is used to perform all XSL transformations for the IDML Tools samples.


Constructor Summary
PackageTransformer()
           
 
Method Summary
protected  void afterTransform(java.lang.String idmlInput, java.io.File inputDir)
          A hook method into the XSL transformation with the String, String, String, ArrayList signature which is called after the transforms take place.
protected  void beforeTransform(java.lang.String idmlInput, java.io.File inputDir)
          A hook method into the XSL transformation with the String, String, String, ArrayList signature which is called before the transforms take place.
protected  boolean isInExcludeList(java.lang.String xmlFile)
          A hook method into the XSL transformation with the String, String, String, ArrayList signature.
 void transform(PackageXslLocator xslLoc, PackageXmlLocator xmlLoc, java.util.ArrayList<XslParam> params)
          Performs XSL transformations on all XML files in the IDML input file.
 void transform(java.lang.String xslDir, java.lang.String idmlInput, java.lang.String idmlOutput, java.util.ArrayList<XslParam> params)
          Performs a set of XSL transformations on an IDML input file or directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PackageTransformer

public PackageTransformer()
Method Detail

transform

public void transform(java.lang.String xslDir,
                      java.lang.String idmlInput,
                      java.lang.String idmlOutput,
                      java.util.ArrayList<XslParam> params)
               throws java.lang.Exception
Performs a set of XSL transformations on an IDML input file or directory. If the input is a directory these transformations are done in place. If it is an archive file, the transformations are done in a temporary directory. In either case you can specify an output IDML file path.

Parameters:
xslDir - Contains the XSL StyleSheets needed to transform the IDML file.
idmlInput - The IDML file or directory to be transformed.
idmlOutput - The path to the IDML file to which the transformations changes should be written. Or null if no changes should be written.
params - A list of key/value pairs containing parameter values required by the XSL StyleSheets.
Throws:
java.lang.Exception

transform

public void transform(PackageXslLocator xslLoc,
                      PackageXmlLocator xmlLoc,
                      java.util.ArrayList<XslParam> params)
               throws java.io.IOException,
                      javax.xml.transform.TransformerFactoryConfigurationError,
                      javax.xml.transform.TransformerException
Performs XSL transformations on all XML files in the IDML input file.

Parameters:
xslLoc - The PackageXslLocator object used to find the XSL files needed in the transformation.
xmlLoc - The PackageXmlLocator object used to find the XML files needed in the transformation.
params - A list of key/value pairs containing parameter values required by the XSL StyleSheets.
Throws:
java.io.IOException
javax.xml.transform.TransformerException
javax.xml.transform.TransformerFactoryConfigurationError

isInExcludeList

protected boolean isInExcludeList(java.lang.String xmlFile)
A hook method into the XSL transformation with the String, String, String, ArrayList signature.

Parameters:
xmlFile - The XML file to be tested.
Returns:
Returns true if the file is in the list and false if not.

beforeTransform

protected void beforeTransform(java.lang.String idmlInput,
                               java.io.File inputDir)
                        throws java.lang.Exception
A hook method into the XSL transformation with the String, String, String, ArrayList signature which is called before the transforms take place.

Parameters:
idmlInput - The path to the IDML file being transformed.
inputDir - The file representing the expanded IDML directory.
Throws:
java.lang.Exception

afterTransform

protected void afterTransform(java.lang.String idmlInput,
                              java.io.File inputDir)
                       throws java.io.IOException
A hook method into the XSL transformation with the String, String, String, ArrayList signature which is called after the transforms take place. @param idmlInput The path to the IDML file being transformed.

Parameters:
inputDir - The file representing the expanded IDML directory.
Throws:
java.io.IOException


Copyright © 2008 Adobe Systems Incorporated. All Rights Reserved.