ApplyXSLTransform

A step based on this step template uses an Extensible Stylesheet Language Transformations (XSLT) style sheet to convert a file in one format into another format. For example, the step can convert XML into another XML format for use as a JDF job ticket or as input to the CreateJobsFromXML step. The step also can convert XML into a text file containing RICOH ProcessDirector job or document properties.

Job property defaults

  • Input file:
  • XSLT style sheet file:
  • Output file:

Usage notes

  • The step supports XSLT Version 1.1.
  • Use an XSLT editor to create the XSLT style sheet.
  • This step can process input files in formats other than XML. For example, if your XSLT style sheet contains the unparsed-text function, you can use a text file as input.
  • To use a file in the spool directory for the job as the input file, specify this value: ${getCurrentFile(extension)}

    where extension is the filename extension.

    For example, to use an XML file in the spool directory, specify ${getCurrentFile(xml)}.

  • To use a text output file as the overrides file in the spool directory for the job, specify this value: ${getFIleName(overrides,txt,write)}.
  • Steps based on the ApplyXSLTransform step template have positional properties. You can place a step with positional properties in a workflow multiple times, and the job properties can take different values when each step is used. The phase and step names appear as section names with the properties of the step shown inside the section.
  • This example shows:
    • A simple input file containing XML elements for order type, copies, paper, file, and industry.
    • An XSLT style sheet that converts the 5 XML elements into 5 corresponding RICOH ProcessDirector job properties: Job.Info.Attr1, Job.Copies, Job.Media, Job.Info.Attr2, and Job.Info.Attr3.
    • An output file containing text for the 5 job properties.
    Input file containing XML
    <?xml version="1.0" encoding="utf-8"?>
    <Order Type="Statement">
        <Copies>4</Copies>
        <Paper>Letter Plain</Paper>
        <File>http://localhost:15080/pd/Demo.pdfFile>http://localhost:15080/pd/Demo.pdf</File>
        <Industry>Hotel</Industry>
    </Order>
    XSLT style sheet
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0">
        <xsl:output method="text" encoding="UTF-8"/>
        <xsl:template match="/">
            <xsl:variable name="var1_initial" select="."/>
            <xsl:for-each select="Order">
                <xsl:variable name="var2_current" select="."/>
                <xsl:value-of select="concat('Job.Info.Attr1=', @Type, '&#10;', 
    		'Job.Copies=', floor(Copies), '&#10;', 'Job.Media=', Paper, '&#10;', 
    		'Job.Info.Attr2=', File, '&#10;', 'Job.Info.Attr3=', Industry)"/>
            <xsl:for-each>
        </xsl:template>
    </xsl:stylesheet>
    Output file containing text
    Job.Info.Attr1=Statement
    Job.Copies=4
    Job.Media=Letter Plain
    Job.Info.Attr2=http://localhost:15080/pd/Demo.pdf
    Job.Info.Attr3=Hotel