<!--
Author.... : Valacar
Date.......: December 20th, 2006
Description: Shows the #1 Game for any console (i.e. pc, xbox 360, etc.) along with its score.
Usage......: Bookmark any console's home page on gamespot.com ...for example: http://www.gamespot.com/xbox360/index.html
             and change its name property to the Live Title (once it's installed).
-->
<generator xmlns="http://www.mozilla.org/microsummaries/0.1" name="GameSpot #1 Game">
	<pages>
		<include>^http://(www\.)?gamespot\.com/(pc|xbox360|ps3|wii|xbox|gamecube|psp|ds|gba|mobile)/(index\.html)?</include>
	</pages>

	<template>
		<transform xmlns="http://www.w3.org/1999/XSL/Transform" version="1.0">
			<output method="text"/>
			<template match="/">

				<choose>

					<!-- test if Most Popular section is there -->

					<when test="id('mp-list')">
						<!-- "#1 [consoleName] game -" -->
						<value-of select="concat('#1 ',id('global_nav')/ul/li[@id='on']/a/text(),' game - ')"/>

						<!-- name of game -->
						<value-of select="id('mp-list')//h3/text()"/>

						<!-- game's score -->
						<value-of select="concat(' [Score: ',id('mp-list')//td[@class='p4'][1]/a/text(),']')"/>
					</when>

					<!-- otherwise output "GameSpot - [pageTitle]" -->

					<otherwise>
						<text>GameSpot</text>
						<value-of select="concat(' - ',//title/text())"/>
					</otherwise>

				</choose>

			</template>
		</transform>
	</template>

</generator>