com.adobe.idml
Class PackageXslLocator

java.lang.Object
  extended by com.adobe.idml.PackageXslLocator

public class PackageXslLocator
extends java.lang.Object

Contains tools for locating the XSL file need for the transformation.


Constructor Summary
PackageXslLocator(java.lang.String xslPath)
          Instantiates a new XSLLocator object for the directory of XSL files provided.
 
Method Summary
 java.lang.String getCorrespondingXslDirPath(java.lang.String xmlFileName)
          Given an XML file name this method will return the path to directory containing the matching XSL file needed for the transform.
 java.lang.String getCorrespondingXslFilePath(java.lang.String xmlFileName)
          Given an XML file name this method will return the path to the matching XSL file needed for the transform.
 java.lang.String getXslRoot()
          Returns the path to the XSL root directory.
 java.lang.String makeDynamicMain(java.util.ArrayList<java.lang.String> params)
          Builds a file named dynamic_main.xsl which will contain XSL:Inlude references to all XSL files in the provided directory and sub-directories.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PackageXslLocator

public PackageXslLocator(java.lang.String xslPath)
                  throws java.io.IOException
Instantiates a new XSLLocator object for the directory of XSL files provided.

Parameters:
xslPath - The path to the root directory containing XSL files.
Throws:
java.io.IOException
Method Detail

getCorrespondingXslFilePath

public java.lang.String getCorrespondingXslFilePath(java.lang.String xmlFileName)
Given an XML file name this method will return the path to the matching XSL file needed for the transform.

Parameters:
xmlFileName - The name of the XML file to be transformed.
Returns:
The path to the XSL file needed for the transform.

getCorrespondingXslDirPath

public java.lang.String getCorrespondingXslDirPath(java.lang.String xmlFileName)
                                            throws java.io.IOException
Given an XML file name this method will return the path to directory containing the matching XSL file needed for the transform.

Parameters:
xmlFileName - The name of the XML file to be transformed.
Returns:
The path to the directory containing the XSL file needed for the transform.
Throws:
java.io.IOException

getXslRoot

public java.lang.String getXslRoot()
Returns the path to the XSL root directory.

Returns:
The path to the XSL root directory

makeDynamicMain

public java.lang.String makeDynamicMain(java.util.ArrayList<java.lang.String> params)
                                 throws java.io.IOException,
                                        javax.xml.parsers.ParserConfigurationException
Builds a file named dynamic_main.xsl which will contain XSL:Inlude references to all XSL files in the provided directory and sub-directories.

Parameters:
params - An ArrayList containing values to be added as XSL:Params to the main.xsl StyleSheet.
Returns:
The file path to the main.xsl file created by this method.
Throws:
java.io.IOException
javax.xml.parsers.ParserConfigurationException


Copyright © 2008 Adobe Systems Incorporated. All Rights Reserved.