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


<xsl:output method="xml" indent="yes" version="1.0" />

<xsl:template match="/">

	<mrss xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
		<channel>
		 	

    	<xsl:for-each select="publisher-upload-manifest/asset">
	    	<item>
	
				<!--xsl:value-of select="../title[ @video-full-refid = 'airport_gibbous_full.flv-52aaedfc6f568c82df324050f' ]/@name"/-->
	
				<xsl:call-template name="insidetitle">
	  				<xsl:with-param name="TitleRef" select="@refid"/>
	  				<xsl:with-param name="FileName" select="@filename"/>
				</xsl:call-template>
    		</item>
    	</xsl:for-each>

		</channel>
	</mrss>
  
</xsl:template>



<xsl:template name="insidetitle">
	<xsl:param name="TitleRef" select="'Undef'"/>
	<xsl:param name="FileName" select="'Undef'"/>
	<!--title><xsl:value-of select="$TitleRef"/></title-->

	<!--xsl:for-each select="/publisher-upload-manifest/title[ @video-full-refid = $TitleRef ]"-->

	<xsl:for-each select="/publisher-upload-manifest/title">

		<xsl:if test="./rendition-refid = string($TitleRef)">
			<action>add</action>
			<!--licenseType>-1</licenseType-->
			<!--userId>test1</userId-->
			<!--partnerData>my own data</partnerData-->
			<type>1</type>
			<name><xsl:value-of select="@name"/></name>
			<description><xsl:value-of select="./long-description"/></description>
			<tags>
				<xsl:for-each select="./tag">
					<tag><xsl:value-of select="."/></tag>
				</xsl:for-each>
			</tags>
			<!--accessControl>Roni</accessControl-->
			<!--ingestionProfile>Roni_Conversion</ingestionProfile-->
			<startDate><xsl:value-of select="@start-date"/></startDate>
			<endDate><xsl:value-of select="@end-date"/></endDate>
			<media>
				<mediaType>1</mediaType> 
			</media>
			<content>
				<xsl:attribute name="flavorParamsId">0</xsl:attribute>
				<localFileContentResource>
				<xsl:attribute name="filePath"><xsl:value-of select="$FileName"/></xsl:attribute>
					<!--fileSize>2743980</fileSize-->
				</localFileContentResource>
			</content>
		</xsl:if>
		
		<xsl:if test="@video-full-refid = string($TitleRef) or @flash-preview-refid = string($TitleRef)">
			<action>add</action>
			<!--licenseType>-1</licenseType-->
			<!--userId>test1</userId-->
			<!--partnerData>my own data</partnerData-->
			<type>1</type>
			<name><xsl:value-of select="@name"/></name>
			<description><xsl:value-of select="./long-description"/></description>
			<tags>
				<xsl:for-each select="./tag">
					<tag><xsl:value-of select="."/></tag>
				</xsl:for-each>
			</tags>
			<!--accessControl>Roni</accessControl-->
			<!--ingestionProfile>Roni_Conversion</ingestionProfile-->
			<startDate><xsl:value-of select="@start-date"/></startDate>
			<endDate><xsl:value-of select="@end-date"/></endDate>
			<media>
				<mediaType>1</mediaType> 
			</media>
			<content>
				<xsl:attribute name="flavorParams"><xsl:value-of select="$FileName"/></xsl:attribute>
				<localFileContentResource>
				<xsl:attribute name="filePath"><xsl:value-of select="$FileName"/></xsl:attribute>
					<!--fileSize>2743980</fileSize-->
				</localFileContentResource>
			</content>
		</xsl:if>
		
		<xsl:if test="@thumbnail-refid = string($TitleRef) or @video-still-refid = string($TitleRef)">
			<action>add</action>
			<type>1</type>
			<name><xsl:value-of select="@name"/></name>
			<description><xsl:value-of select="./long-description"/></description>
			<tags>
				<xsl:for-each select="./tag">
					<tag><xsl:value-of select="."/></tag>
				</xsl:for-each>
			</tags>
			<startDate><xsl:value-of select="@start-date"/></startDate>
			<endDate><xsl:value-of select="@end-date"/></endDate>
			<media>
				<mediaType>2</mediaType> 
			</media>
			<content>
				<xsl:attribute name="flavorParams"><xsl:value-of select="$FileName"/></xsl:attribute>
				<localFileContentResource>
				<xsl:attribute name="filePath"><xsl:value-of select="$FileName"/></xsl:attribute>
					<!--fileSize>2743980</fileSize-->
				</localFileContentResource>
			</content>
		</xsl:if>
		
		<xsl:if test="@video-still-refid = string($TitleRef)">
		
		</xsl:if>

	</xsl:for-each>

	
</xsl:template>


  <xsl:template name="FormatDate">
    <xsl:param name="DateTime" />
    <!-- new date format 2006-01-14T08:55:22 -->
    <xsl:variable name="mo">
      <xsl:value-of select="substring($DateTime,1,3)" />
    </xsl:variable>
    <xsl:variable name="day-temp">
      <xsl:value-of select="substring-after($DateTime,'-')" />
    </xsl:variable>
    <xsl:variable name="day">
      <xsl:value-of select="substring-before($day-temp,'-')" />
    </xsl:variable>
    <xsl:variable name="year-temp">
      <xsl:value-of select="substring-after($day-temp,'-')" />
    </xsl:variable>
    <xsl:variable name="year">
      <xsl:value-of select="substring($year-temp,1,4)" />
    </xsl:variable>
    <xsl:variable name="time">
      <xsl:value-of select="substring-after($year-temp,' ')" />
    </xsl:variable>
    <xsl:variable name="hh">
      <xsl:value-of select="substring($time,1,2)" />
    </xsl:variable>
    <xsl:variable name="mm">
      <xsl:value-of select="substring($time,4,2)" />
    </xsl:variable>
    <xsl:variable name="ss">
      <xsl:value-of select="substring($time,7,2)" />
    </xsl:variable>
    <xsl:value-of select="$year"/>
    <xsl:value-of select="'-'"/>
    <xsl:choose>
      <xsl:when test="$mo = 'Jan'">01</xsl:when>
      <xsl:when test="$mo = 'Feb'">02</xsl:when>
      <xsl:when test="$mo = 'Mar'">03</xsl:when>
      <xsl:when test="$mo = 'Apr'">04</xsl:when>
      <xsl:when test="$mo = 'May'">05</xsl:when>
      <xsl:when test="$mo = 'Jun'">06</xsl:when>
      <xsl:when test="$mo = 'Jul'">07</xsl:when>
      <xsl:when test="$mo = 'Aug'">08</xsl:when>
      <xsl:when test="$mo = 'Sep'">09</xsl:when>
      <xsl:when test="$mo = 'Oct'">10</xsl:when>
      <xsl:when test="$mo = 'Nov'">11</xsl:when>
      <xsl:when test="$mo = 'Dec'">12</xsl:when>
    </xsl:choose>
    <xsl:value-of select="'-'"/>
    <xsl:if test="(string-length($day) &lt; 2)">
      <xsl:value-of select="0"/>
    </xsl:if>
    <xsl:value-of select="$day"/>
    <xsl:value-of select="'T'"/>
    <xsl:value-of select="$hh"/>
    <xsl:value-of select="':'"/>
    <xsl:value-of select="$mm"/>
    <xsl:value-of select="':'"/>
    <xsl:value-of select="$ss"/>
  </xsl:template>


</xsl:stylesheet><commit_msg>qnd: request for transform xml bulk upload with xslt<commit_after><?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">


<xsl:output method="xml" indent="yes" version="1.0" />

<xsl:template match="/">

	<mrss xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
		<channel>
		 	

    	<xsl:for-each select="publisher-upload-manifest/asset">
	    	<item>
	
				<!--xsl:value-of select="../title[ @video-full-refid = 'airport_gibbous_full.flv-52aaedfc6f568c82df324050f' ]/@name"/-->
	
				<xsl:call-template name="insidetitle">
	  				<xsl:with-param name="TitleRef" select="@refid"/>
	  				<xsl:with-param name="FileName" select="@filename"/>
				</xsl:call-template>
    		</item>
    	</xsl:for-each>

		</channel>
	</mrss>
  
</xsl:template>



<xsl:template name="insidetitle">
	<xsl:param name="TitleRef" select="'Undef'"/>
	<xsl:param name="FileName" select="'Undef'"/>
	<!--title><xsl:value-of select="$TitleRef"/></title-->

	<!--xsl:for-each select="/publisher-upload-manifest/title[ @video-full-refid = $TitleRef ]"-->

	<xsl:for-each select="/publisher-upload-manifest/title">

		<xsl:if test="./rendition-refid = string($TitleRef)">
			<action>add</action>
			<!--licenseType>-1</licenseType-->
			<!--userId>test1</userId-->
			<!--partnerData>my own data</partnerData-->
			<type>1</type>
			<name><xsl:value-of select="@name"/></name>
			<description><xsl:value-of select="./long-description"/></description>
			<tags>
				<xsl:for-each select="./tag">
					<tag><xsl:value-of select="."/></tag>
				</xsl:for-each>
			</tags>
			<!--accessControl>Roni</accessControl-->
			<!--ingestionProfile>Roni_Conversion</ingestionProfile-->
			<startDate>
				<xsl:call-template name="FormatDate">
	  				<xsl:with-param name="DateTime" select="@start-date"/>
				</xsl:call-template>
			</startDate>
			<endDate>
				<xsl:call-template name="FormatDate">
	  				<xsl:with-param name="DateTime" select="@end-date"/>
				</xsl:call-template>
			</endDate>
			<media>
				<mediaType>1</mediaType> 
			</media>
			<content>
				<xsl:attribute name="flavorParamsId">0</xsl:attribute>
				<serverFileContentResource>
				<xsl:attribute name="filePath"><xsl:value-of select="$FileName"/></xsl:attribute>
					<!--fileSize>2743980</fileSize-->
				</serverFileContentResource>
			</content>
		</xsl:if>
		
		<xsl:if test="@video-full-refid = string($TitleRef) or @flash-preview-refid = string($TitleRef)">
			<action>add</action>
			<!--licenseType>-1</licenseType-->
			<!--userId>test1</userId-->
			<!--partnerData>my own data</partnerData-->
			<type>1</type>
			<name><xsl:value-of select="@name"/></name>
			<description><xsl:value-of select="./long-description"/></description>
			<tags>
				<xsl:for-each select="./tag">
					<tag><xsl:value-of select="."/></tag>
				</xsl:for-each>
			</tags>
			<!--accessControl>Roni</accessControl-->
			<!--ingestionProfile>Roni_Conversion</ingestionProfile-->
			<startDate>
				<xsl:call-template name="FormatDate">
	  				<xsl:with-param name="DateTime" select="@start-date"/>
				</xsl:call-template>
			</startDate>
			<endDate>
				<xsl:call-template name="FormatDate">
	  				<xsl:with-param name="DateTime" select="@end-date"/>
				</xsl:call-template>
			</endDate>
			<media>
				<mediaType>1</mediaType> 
			</media>
			<content>
				<xsl:attribute name="flavorParams"><xsl:value-of select="$FileName"/></xsl:attribute>
				<serverFileContentResource>
				<xsl:attribute name="filePath"><xsl:value-of select="$FileName"/></xsl:attribute>
					<!--fileSize>2743980</fileSize-->
				</serverFileContentResource>
			</content>
		</xsl:if>
		
		<xsl:if test="@thumbnail-refid = string($TitleRef) or @video-still-refid = string($TitleRef)">
			<action>add</action>
			<type>1</type>
			<name><xsl:value-of select="@name"/></name>
			<description><xsl:value-of select="./long-description"/></description>
			<tags>
				<xsl:for-each select="./tag">
					<tag><xsl:value-of select="."/></tag>
				</xsl:for-each>
			</tags>
			<startDate>
				<xsl:call-template name="FormatDate">
	  				<xsl:with-param name="DateTime" select="@start-date"/>
				</xsl:call-template>
			</startDate>
			<endDate>
				<xsl:call-template name="FormatDate">
	  				<xsl:with-param name="DateTime" select="@end-date"/>
				</xsl:call-template>
			</endDate>
			<media>
				<mediaType>2</mediaType> 
			</media>
			<content>
				<xsl:attribute name="flavorParams"><xsl:value-of select="$FileName"/></xsl:attribute>
				<serverFileContentResource>
				<xsl:attribute name="filePath"><xsl:value-of select="$FileName"/></xsl:attribute>
					<!--fileSize>2743980</fileSize-->
				</serverFileContentResource>
			</content>
		</xsl:if>
		
	</xsl:for-each>

	
</xsl:template>


  <xsl:template name="FormatDate">
    <xsl:param name="DateTime" />
    <!-- from date format 10/02/2011 7:45 AM -->
    <!-- to date format 2006-01-14T08:55:22 -->
    <xsl:variable name="mo">
      <xsl:value-of select="substring-before($DateTime,'/')" />
    </xsl:variable>
    <xsl:variable name="DayTemp">
      <xsl:value-of select="substring-after($DateTime,'/')" />
    </xsl:variable>
    <xsl:variable name="day">
      <xsl:value-of select="substring-before($DayTemp,'/')" />
    </xsl:variable>
    <xsl:variable name="YearTemp">
      <xsl:value-of select="substring-after($DayTemp,'/')" />
    </xsl:variable>
    <xsl:variable name="year">
      <xsl:value-of select="substring-before($YearTemp,' ')" />
    </xsl:variable>
    
    
    <xsl:variable name="HourMinute">
      <xsl:value-of select="substring-after($DateTime,' ')" />
    </xsl:variable>
    <xsl:variable name="ampm">
      <xsl:value-of select="substring-after($HourMinute,' ')" />
    </xsl:variable>
    
    <xsl:variable name="hh">
      <xsl:value-of select="substring-before($HourMinute,':')" />
    </xsl:variable>
    <xsl:variable name="Minute">
      <xsl:value-of select="substring-before($HourMinute,' ')" />
    </xsl:variable>
    <xsl:variable name="mm">
      <xsl:value-of select="substring-after($Minute,':')" />
    </xsl:variable>
    
    <xsl:value-of select="$year"/>
    <xsl:value-of select="'-'"/>
    <xsl:if test="(string-length($mo) = '1')">
      <xsl:value-of select="0"/>
    </xsl:if>
    <xsl:value-of select="$mo"/>
    <xsl:value-of select="'-'"/>
    <xsl:if test="(string-length($day) = '1')">
      <xsl:value-of select="0"/>
    </xsl:if>
    <xsl:value-of select="$day"/>
    <xsl:value-of select="'T'"/>
    <xsl:if test="($ampm = 'AM')">
    	<xsl:if test="(string-length($hh) = '1')">
      		<xsl:value-of select="0"/>
    	</xsl:if>
    	<xsl:value-of select="$hh"/>
    </xsl:if>
    <xsl:if test="($ampm = 'PM')">
	    <xsl:choose>
	    	<xsl:when test="$hh = '12'"><xsl:value-of select="'00'"/></xsl:when>
	    	<xsl:otherwise><xsl:value-of select="string(sum($hh) + 12)"/></xsl:otherwise>
	    </xsl:choose>
    </xsl:if>
    <xsl:value-of select="':'"/>
    <xsl:value-of select="$mm"/>
    <xsl:value-of select="':'"/>
    <xsl:value-of select="'00'"/>
  </xsl:template>


</xsl:stylesheet>
{'fraction_non_alphanumeric': 0.2288403559085227, 'fraction_numerical': 0.01654533421575116, 'mean_word_length': 3.654346338124572, 'pattern_counts': {'":': 0, '<': 496, '<?xml version=': 2, '>': 496, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 11}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2223377', 'n_tokens_mistral': 5802, 'n_tokens_neox': 4786, 'n_words': 650}