<?xml version="1.0"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:variable name="outputdir" select="'file:///c:/temp'"/>
	<xsl:output method="xml" indent="yes"/>
	<xsl:template match="/">
		<xsl:for-each select="music_database/label/product">
			<xsl:result-document href="{$outputdir}/section{position()}.xml" method="xml">
				<document>
					<release title="{product_title}" labelName="{../label_name}" catalogNumber="{cat_number}" 
							 releaseDate="{scheduled_release_date}" upc="{upc}" coverArtFilename="FLO_{cat_number}.jpg">
						<track-list>
							<xsl:for-each select="track">
								<track title="{track_title}" mixTitle="{track_version}" artistName="{artist/artist_name}" 
								       genreId="{style_labeldef}" length="{duration}" wavFilename="{track_key}.wav">
									<xsl:copy-of select="@isrc | @composer | @composer | @lyricist"/>
								</track>
							</xsl:for-each>
						</track-list>
					</release>
				</document>
			</xsl:result-document>
		</xsl:for-each>
		<dummy/>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2007. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="BreakpointStylus" userelativepaths="yes" externalpreview="no" url="20070301151501.xml" htmlbaseurl="" outputurl="" 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="false"/><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="MappingOutput.xml" destSchemaRoot="document" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no" ><SourceSchema srcSchemaPath="20070301151501.xml" srcSchemaRoot="music_database" AssociatedInstance="" loaderFunction="document" loaderFunctionUsesURI="no"/></MapperInfo><MapperBlockPosition><template match="/"><block path="document/xsl:for-each/release/track-list/xsl:for-each" x="286" y="114"/><block path="document/xsl:for-each" x="146" y="79"/></template></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
</metaInformation>
-->