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

	<xsl:output method="text"/>
	<xsl:variable name="pad-string">
		<xsl:text>                                                  </xsl:text>
	</xsl:variable>
	<xsl:variable name="new-line">
		<xsl:text>
</xsl:text>
	</xsl:variable>

	<xsl:template match="/">
		<xsl:apply-templates select="/CSV/Record"/>
	</xsl:template>


	<xsl:template match="/CSV/Record">
		<xsl:variable name="record-element" select="."/>
		<xsl:for-each select="/CSV/CSV/*">
			<xsl:variable name="format-element" select="."/>
			<xsl:variable name="dataVal" select="$record-element/*[local-name()=local-name($format-element)]"/>
			<xsl:value-of select="substring(concat($dataVal,$pad-string),1,$format-element/@length)"/>
		</xsl:for-each>
		<xsl:value-of select="$new-line"/>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2005. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="Scenario1" userelativepaths="yes" externalpreview="no" url="chris.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>
-->