xsl-list
[Top] [All Lists]

[xsl] Batch transform into one file

2008-01-14 18:47:15

Hi. I need to alter the stylesheet below to create 1 text file with the data extracted from multiple XML files from a batch transform. Right now it will create 1 text file for each XML file transformed.

Background: I receive XML files that I batch transform. These files are from two sources: source 1 is W1L, source 2 is W1S. When I receive these files, they are mixed so I do not know which files are from which source. I want to have the below stylesheet create one text file that will contain a list of all file numbers (File #<xsl:copy-of select="field[(_at_)id='4']"/) where the "@id='W1L'", and ignore anything else.

Thanks in advance.


Gary




=========================================================================================
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">

<xsl:output method="text"/>

<xsl:template match="filename"/>
<xsl:template match="mimetype"/>
<xsl:template match="mimedata"/>

<xsl:template match="AppraisalForm">

<!-- This is file 'Long Form.xsl' -->

<!-- Use this to batch transform XML files and make one file that contains a list of file

names where where "@id='W1L'". If "@id<>'W1L'", then nothing is extracted from that XML

file -->

<!-- Select specific Node or Form based on its id -->

<xsl:if test="@id='W1S'">

        File #<xsl:copy-of select="field[(_at_)id='4']"/>

</xsl:if>

</xsl:template>








--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>