Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="ISO-8859-1"?>
- <xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
- <!--
- Wwise renamer XSL v1 (by bnnm)
- Extracts .wem names from SoundBankInfo.xml to generate Windows CMD rename commands.
- -->
- <!-- external vars -->
- <xsl:param name="param.name2wem"/>
- <xsl:param name="param.wem2wem_name"/>
- <!-- output format -->
- <xsl:output method="text" indent="no" encoding="UTF-8"/>
- <!-- root match -->
- <xsl:template match="/">
- <!-- UTF8 codepage and stuff for batch -->
- <xsl:text>@REM utf8 ignore

</xsl:text>
- <xsl:text>@echo off
</xsl:text>
- <xsl:text>chcp 65001
</xsl:text>
- <xsl:for-each select="SoundBanksInfo/StreamedFiles/File">
- <!-- write ren line for each file -->
- <xsl:choose>
- <xsl:when test="$param.name2wem">
- <xsl:text>ren "</xsl:text><xsl:value-of select="ShortName"/><xsl:text>.wem" </xsl:text><xsl:value-of select="@Id"/><xsl:text>.wem
</xsl:text>
- </xsl:when>
- <xsl:when test="$param.wem2wem_name">
- <xsl:text>ren </xsl:text><xsl:value-of select="@Id"/><xsl:text>.wem "</xsl:text><xsl:value-of select="@Id"/><xsl:text>__</xsl:text><xsl:value-of select="ShortName"/><xsl:text>.wem"
</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>ren </xsl:text><xsl:value-of select="@Id"/><xsl:text>.wem "</xsl:text><xsl:value-of select="ShortName"/><xsl:text>.wem"
</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </xsl:template>
- </xsl:stylesheet>
Add Comment
Please, Sign In to add comment