[xsl] Batch transform into one file
Subject: [xsl] Batch transform into one file|
From: "Gary E. Daniels" <gdaniels@xxxxxxxxxxx>
Date: Mon, 14 Jan 2008 19:46:40 -0600
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.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- 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
<!-- Select specific Node or Form based on its id -->
File #<xsl:copy-of select="field[@id='4']"/>