<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<xsl:template match="/">
		<xsl:apply-templates select="Batch/Page/Field[Name = 'FileName']"/>
	</xsl:template>
	<xsl:template match="Field">
		<xsl:value-of select="Value"/>
		<xsl:text>|</xsl:text>
		<xsl:choose>
			<xsl:when test="../Field[Name = 'Barcode']/Value">
				<xsl:value-of select="../Field[Name = 'Barcode']/Value"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="../preceding-sibling::Page[Field/Name = 'Barcode'][1]/Field[Name = 'Barcode']/Value"/>
			</xsl:otherwise>
		</xsl:choose>
		<xsl:text>&#xD;&#xA;</xsl:text>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2007. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="Scenario1" userelativepaths="yes" externalpreview="no" url="bar.xml" htmlbaseurl="" outputurl="" processortype="internal" useresolver="yes" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator=""/></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/><MapperBlockPosition></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
</metaInformation>
-->