[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
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:output method="text"/>
<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>
[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.
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>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] saxon:try(), Florent Georges | Thread | Re: [xsl] Batch transform into one , Wendell Piez |
Re: [xsl] Problem while calling Web, Florent Georges | Date | [xsl] [Announce] Qizx/db 2.0 Releas, Olivier Ishacian |
Month |
Keywords