[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: RE: Join XMLs with XLST with ralative data

Subject: RE: RE: Join XMLs with XLST with ralative data
From: Mangesh Kakade <wadapaav@xxxxxxxxx>
Date: Mon, 9 Jun 2003 04:44:34 -0700 (PDT)
joining data with xslt
Hi,
I changed it accordingly i.e.
<xsl:for-each select="key('rows-bstkcode',$STKCODE1)">
	<xsl:copy>					  <xsl:copy-of select="@*"/>		
</xsl:copy>			
</xsl:for-each>
It dosnt work ?.result is same as earlier  
..if i hardcode the value of "$STKCODE' varilabe ..say
31 then i get the result but not desirable as 
<tran>
- <stock>
  <hihi /> 
  <stockcode>31</stockcode> 
  <name id="a001" deptid="01" /> 
  <name id="a010" /> 
  </stock>
- <stock>
  <hihi /> 
  <stockcode>30</stockcode> 
  <name id="a001" deptid="01" /> 
  <name id="a010" /> 
  </stock>
- <stock>
  <hihi /> 
  <stockcode>32</stockcode> 
  <name id="a001" deptid="01" /> 
  <name id="a010" /> 
  </stock>
  </tran>
Ofcourse the out is not same as I am expecting  I dont
know why am i gettig "stockcode" 32 wherein there is
no entry of 32 in buy22.xml and same entry for all the
stockcodes 
TIA
Mangesh
..and still getting the same result 
--- Jarno.Elovirta@xxxxxxxxx wrote:
> Hi,
> 
> [snip]
> 
> > so based on suggestion I have modified my xslt to
> :
> > <xsl:stylesheet version="1.0"
> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> > 	<xsl:key name="rows-bstkcode" match="name"
> > use="bstkcode"/>
> > 	<xsl:variable name="x_22"
> > select="document('22.xml')"/>
> > 	<xsl:variable name="buy22"
> > select="document('buy22.xml')"/>
> > 	<xsl:template match="/">
> > 		<tran>
> > 		     <xsl:for-each
> > select="$x_22/STKAVAILABLE/STKMAST">
> > 		      <xsl:variable name="STKCODE1"
> > select="@STKCODE"/>
> > 			<xsl:for-each select="$buy22/buyermaster">
> > 			   <stock>
> > 		                  <stockcode> <xsl:value-of
> > select="$STKCODE1" /></stockcode>
> > 			      <xsl:for-each
> > select="key('rows-bstkcode',$STKCODE1)">
> > 				      <xsl:copy>		
> > 								
> > 	<xsl:copy-of
> > select="bstkcode"/>
> 
> this should be
> 
>   <xsl:copy-of select="@*"
> 
> Cheers,
> 
> Jarno - Funker Vogt: Vision
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> 


__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.