This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Problem with getting values from two files


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]