RE: [xsl] Problem with getting values from two files

Subject: RE: [xsl] Problem with getting values from two files
From: "Sachidanandam E K" <sachidanandam.kumaraswamy@xxxxxxxxxxxxxx>
Date: Thu, 3 May 2001 13:31:33 +0530
This is a xsl which is likely to your problem,
For me same kind of requirements came i did it with the help of jeni.
Try to modify few things in this you will get solution.


<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">
<xsl:output method="xml" />

	<xsl:variable name="A" select="document('AA1.xml')/Address" />
	<xsl:variable name="B"
select="document('BB1.xml')/CompositeAddress/JohanCompositeAddress" />

	<xsl:key name="Johanadd" match="JohanCompositeAddress" use="Address" />


<xsl:template match="/">
	<UserName>

		<xsl:for-each select="$A/@value">
			<xsl:variable name="xx" select="." />
				<xsl:for-each select="$B">
					<xsl:if test="not(key('JohanCompositeAddress', $xx/@value))">
						<xsl:copy-of select="$xx" />
					</xsl:if>
				</xsl:for-each>
		</xsl:for-each>

	</UserName>
</xsl:template>
</xsl:stylesheet>


Cheers!!
Sachi


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread