-
Notifications
You must be signed in to change notification settings - Fork 53
/
missinggames.xslt
33 lines (28 loc) · 1.4 KB
/
missinggames.xslt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?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"/>
<xsl:param name="xci" select="'SBM_Local.xml'"/>
<xsl:param name="nsp" select="'SBM_NSP_Local.xml'"/>
<xsl:template match="/releases">
<xsl:variable name="docXCI" select="document($xci)"/>
<xsl:variable name="docNSP" select="document($nsp)"/>
<xsl:element name="Games">
<xsl:for-each select="release[region/text()!='JPN']">
<xsl:sort select="name"/>
<xsl:variable name="releaseId" select="titleid"/>
<xsl:variable name="gameName" select="name"/>
<xsl:choose>
<!-- <xsl:when test="$docXCI/Games/Game[@TitleID=$releaseId]"> -->
<xsl:when test="not($docXCI/Games/Game[GameName=$gameName] or $docNSP/Games/Game[GameName=$gameName]) and not($docXCI/Games/Game[@TitleID=$releaseId] or $docNSP/Games/Game[@TitleID=$releaseId])">
<xsl:element name="Game">
<xsl:attribute name="TitleID"><xsl:value-of select="$releaseId"/></xsl:attribute>
<xsl:element name="GameName"><xsl:value-of select="name"/></xsl:element>
<xsl:element name="Developer"><xsl:value-of select="publisher"/></xsl:element>
</xsl:element>
</xsl:when>
</xsl:choose>
<xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:element>
</xsl:template>
</xsl:stylesheet>