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[@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[@id='4']"/>
</xsl:if>
</xsl:template>