<?xml version="1.0" encoding="ASCII"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="ASCII"/>

	<xsl:template match="/">
		<xsl:apply-templates select="ticker/quote"/>
	</xsl:template>

	<xsl:template match="quote">
		<xsl:call-template name="pad-right">
			<xsl:with-param name="str" select="company/text()"/>
			<xsl:with-param name="len" select="25"/>
		</xsl:call-template>
		<xsl:call-template name="pad-right">
			<xsl:with-param name="str" select="symbol/text()"/>
			<xsl:with-param name="len" select="10"/>
		</xsl:call-template>
		<xsl:call-template name="pad-left">
			<xsl:with-param name="str" select="exchange/text()"/>
			<xsl:with-param name="len" select="10"/>
		</xsl:call-template>
 		<!-- add newline -->
		<xsl:text>&#10;</xsl:text>
	</xsl:template>

	<xsl:template name="pad-left">
		<xsl:param name="str"/>
		<xsl:param name="len"/>
		<xsl:choose>
			<xsl:when test="string-length($str) &gt; $len">
				<xsl:value-of select="substring($str, 1, $len)"/>
			</xsl:when>
			<xsl:when test="string-length($str) &lt; $len">
				<xsl:call-template name="pad-left">
					<xsl:with-param name="str" select="concat(' ', $str)"/>
					<xsl:with-param name="len" select="$len"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$str"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<xsl:template name="pad-right">
		<xsl:param name="str"/>
		<xsl:param name="len"/>
		<xsl:choose>
			<xsl:when test="string-length($str) &gt; $len">
				<xsl:value-of select="substring($str, 1, $len)"/>
			</xsl:when>
			<xsl:when test="string-length($str) &lt; $len">
				<xsl:call-template name="pad-right">
					<xsl:with-param name="str" select="concat($str, ' ')"/>
					<xsl:with-param name="len" select="$len"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$str"/>
			</xsl:otherwise>
		</xsl:choose>
	</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="your-quotes.xml" htmlbaseurl="" outputurl="your-quotes.txt" processortype="saxon8" useresolver="yes" profilemode="0" profiledepth="" profilelength=""
		          urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal"
		          customvalidator="">
			<advancedProp name="sInitialMode" value=""/>
			<advancedProp name="bXsltOneIsOkay" value="true"/>
			<advancedProp name="bSchemaAware" value="true"/>
			<advancedProp name="bXml11" value="false"/>
			<advancedProp name="iValidation" value="0"/>
			<advancedProp name="bExtensions" value="true"/>
			<advancedProp name="iWhitespace" value="0"/>
			<advancedProp name="sInitialTemplate" value=""/>
			<advancedProp name="bTinyTree" value="true"/>
			<advancedProp name="bWarnings" value="true"/>
			<advancedProp name="bUseDTD" value="false"/>
			<advancedProp name="iErrorHandling" value="fatal"/>
		</scenario>
	</scenarios>
	<MapperMetaTag>
		<MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no">
			<SourceSchema srcSchemaPath="your-quotes.xml" srcSchemaRoot="ticker" AssociatedInstance="" loaderFunction="document" loaderFunctionUsesURI="no"/>
		</MapperInfo>
		<MapperBlockPosition>
			<template match="/">
				<block path="xsl:apply-templates" x="178" y="61"/>
			</template>
			<template name="pad-right"></template>
			<template match="quote"></template>
		</MapperBlockPosition>
		<TemplateContext></TemplateContext>
		<MapperFilter side="source"></MapperFilter>
	</MapperMetaTag>
</metaInformation>
-->