com.adobe.idml.samples
Class AddCatalogPages

java.lang.Object
  extended by com.adobe.idml.PackageTransformer
      extended by com.adobe.idml.samples.AddCatalogPages

public class AddCatalogPages
extends PackageTransformer

The AddCatalogPages sample extends PackageTransformer taking advantage of a hook it provides that allows a subclass to do additional work before or after the transformation. The core PackageTransformer code transforms the designmap.xml file using the the xsl/transforms/designmap.xsl file. The added code expands several XSL templates in the xsl/templates directory template into the new spread and story files.


Constructor Summary
AddCatalogPages(java.lang.String xslTransformPath, java.lang.String xslTemplatePath, java.lang.String xmlPath)
          This constructor sets up the XSL paths and the input XML file containing the information needed to add new content to the an existing IDML file.
 
Method Summary
 void addPages(java.lang.String idmlInput, java.lang.String idmlOutput)
          Adds pages to an existing IDML file.
protected  void beforeTransform(java.lang.String idmlInput, java.io.File idmlInputDir)
          Overrides beforeTransform of the PackageTransformer class.
static void main(java.lang.String[] args)
           
 
Methods inherited from class com.adobe.idml.PackageTransformer
afterTransform, isInExcludeList, transform, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddCatalogPages

public AddCatalogPages(java.lang.String xslTransformPath,
                       java.lang.String xslTemplatePath,
                       java.lang.String xmlPath)
                throws javax.xml.parsers.ParserConfigurationException
This constructor sets up the XSL paths and the input XML file containing the information needed to add new content to the an existing IDML file.

Parameters:
xslTransformPath -
xslTemplatePath -
xmlPath -
Throws:
javax.xml.parsers.ParserConfigurationException
Method Detail

beforeTransform

protected void beforeTransform(java.lang.String idmlInput,
                               java.io.File idmlInputDir)
                        throws java.lang.Exception
Overrides beforeTransform of the PackageTransformer class. This method creates the new stories and spread to be added to the IDML packages based on the content in the XML file represented by the fXMLPath instance variable.

Overrides:
beforeTransform in class PackageTransformer
Parameters:
idmlInput - The path to the IDML file being transformed.
idmlInputDir - The file representing the expanded IDML directory.
Throws:
javax.xml.xpath.XPathExpressionException
java.lang.Exception

addPages

public void addPages(java.lang.String idmlInput,
                     java.lang.String idmlOutput)
              throws java.lang.Exception
Adds pages to an existing IDML file.

Parameters:
idmlInput - The IDML file which will have pages added to it.
idmlOutput - The IDML file which will be created after the pages are added.
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
Parameters:
args -


Copyright © 2008 Adobe Systems Incorporated. All Rights Reserved.