view test/javax/xml/jaxp/unittest/transform/transform.xsl @ 779:2b61bfcaa586

8132660: Change jaxp unit test package name to be different with jaxp api Reviewed-by: joehw Contributed-by: frank.yuan@oracle.com
author joehw
date Mon, 10 Aug 2015 09:52:32 -0700
parents test/javax/xml/jaxp/unittest/javax/xml/transform/transform.xsl@29ba77ad2a87
children
line wrap: on
line source

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE stylesheet []>

<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

	<xsl:param name="config"/>
	<xsl:param name="mapsFile"/>

	<xsl:output method="text"/>

	<xsl:key name="key1" match="map1" use="@type"/>
	<xsl:key name="key2" match="map2" use="@type"/>
        
	<xsl:variable name="maps" select="document($mapsFile)"/>
	<xsl:variable name="type" select="document($config)/config/@type"/>

	<xsl:template match="map1">
		<xsl:for-each select="$maps">
			<xsl:value-of select="key('key1', $type)"/>
		</xsl:for-each>
	</xsl:template>

	<xsl:template match="map2">
		<xsl:for-each select="$maps">
			<xsl:value-of select="key('key2',$type)"/>
		</xsl:for-each>
	</xsl:template>
</xsl:stylesheet>