<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" /> 

	<xsl:template match="/">
		<locations>
			<xsl:apply-templates/>
		</locations>
	</xsl:template>
	
	<xsl:template match="/locations">
		<NormalLocations>
		<xsl:for-each select="location[not(@popular) or @popular ne 'yes']">
			<location><xsl:value-of select="."/></location>
		</xsl:for-each>
		</NormalLocations>
		<PopularLocations>
		<xsl:for-each select="location[@popular eq 'yes']">
			<location><xsl:value-of select="."/></location>
		</xsl:for-each>
		</PopularLocations>
	</xsl:template>
	
</xsl:stylesheet>

