<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
	<xsl:output method="xml" encoding="ISO-8859-1"/>
	<xsl:template match="/">
	<titleContent>
	     <DTD_Dalet_XML>1.1</DTD_Dalet_XML>

	     <title>
        	 <siteId>3</siteId>
	         <siteName>site3</siteName>
	         <id></id>
	         <typeName>Audio</typeName>
	         <interfaceName>Standard</interfaceName>
	         <isOnline>1</isOnline>
	         <isRecorded>1</isRecorded>
	         <name><xsl:value-of select="AudioMetadata/ConvertedFile/IDTags/Title"/></name>
	         <interpretComment><xsl:value-of select="AudioMetadata/ConvertedFile/IDTags/Artist"/></interpretComment>
	         <author> </author>
	         <client><xsl:value-of select="AudioMetadata/ConvertedFile/IDTags/Artist"/></client>
		 <xsl:variable name="recyear">
		   <xsl:value-of select="substring(AudioMetadata/ConvertedFile/FileCreated,1,4)" /> 
		 </xsl:variable>
		 <xsl:variable name="recmonth">
		   <xsl:value-of select="substring(AudioMetadata/ConvertedFile/FileCreated,6,2)" /> 
		 </xsl:variable>
		 <xsl:variable name="recday">
		   <xsl:value-of select="substring(AudioMetadata/ConvertedFile/FileCreated,9,2)" /> 
		 </xsl:variable>
	         <recordDate><xsl:value-of select="concat($recday,'-',$recmonth,'-',$recyear)" /></recordDate>
	         <startDate><xsl:value-of select="concat($recday,'-',$recmonth,'-',$recyear)" /></startDate>
	         <endDate>31-12-2020</endDate>
	         <killDate>31-12-2020</killDate>
	         <lastModifTime><xsl:value-of select="AudioMetadata/ConvertedFile/FileModified" /></lastModifTime>
	         <year><xsl:value-of select="AudioMetadata/ConvertedFile/IDTags/Year"/></year>
	         <itemCode></itemCode>
	         <reference></reference>
	         <text></text>
	         <version>1</version>
	         <duration><xsl:value-of select="AudioMetadata/ConvertedFile/FileLength"/></duration>
	         <weight>100</weight>
	         <beatsPM>-1</beatsPM>
	         <label></label>
	         <album></album>
	         <yearComposed>1900</yearComposed>
	         <classic1></classic1>
	         <classic2></classic2>
	         <labelReference></labelReference>
	         <volumeNumber></volumeNumber>
	         <oeuvre></oeuvre>
	         <act></act>
	         <orchestra></orchestra>
	         <composer></composer>
	         <conductor></conductor>
	         <period></period>
	         <cut></cut>
	         <beginOffset>0</beginOffset>
	         <endOffset>0</endOffset>
	         <intro>0</intro>
	         <intro2>0</intro2>
	         <outro>0</outro>
	         <fadeIn>0</fadeIn>
	         <fadeOut>0</fadeOut>
	         <soundUnitId></soundUnitId>
	         <soundUnitName></soundUnitName>
	         <soundFileId></soundFileId>
	         <soundFileName><xsl:value-of select="AudioMetadata/ConvertedFile/FileNamePath"/><xsl:value-of select="AudioMetadata/ConvertedFile/FileName"/></soundFileName>
	         <interpret>
	             <s><xsl:value-of select="AudioMetadata/ConvertedFile/IDTags/Artist"/></s>
	         </interpret>
	         <multiMedia></multiMedia>
	         <titleSound>
	             <lastModifTime>1-1-1900</lastModifTime>
	             <file><xsl:value-of select="AudioMetadata/ConvertedFile/FileNamePath"/><xsl:value-of select="AudioMetadata/ConvertedFile/FileName"/></file>
	             <fileSize><xsl:value-of select="AudioMetadata/ConvertedFile/FileSize"/></fileSize>
	             <soundDuration><xsl:value-of select="AudioMetadata/ConvertedFile/FileLength"/></soundDuration>

	             <xsl:choose>
	               <xsl:when test="AudioMetadata/ConvertedFile/AudioFormat/Channels = 1">
	                 <channelMode>mono</channelMode>
	               </xsl:when>
	               <xsl:otherwise>
	                 <channelMode>stereo</channelMode>
	               </xsl:otherwise>
	             </xsl:choose>
	             
	             <sampleRate><xsl:value-of select="AudioMetadata/ConvertedFile/AudioFormat/SamplesPerSec"/></sampleRate>
	             <channelBitRate>0</channelBitRate>
	             <compressionRatio>0</compressionRatio>
	         </titleSound>
	         <comments>
	         </comments>
	     </title>
	</titleContent>
	</xsl:template>
</xsl:stylesheet>