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

Re: Mapping from two sources

Subject: Re: Mapping from two sources
From: sudheshna iyer <sudheshnaiyer@xxxxxxxxx>
Date: Sat, 2 Oct 2010 03:59:45 -0700 (PDT)
Re:  Mapping from two sources
Hi, 

does xsl:for-each-group acts like inner join?

Thank you for the
response. 

--- On Fri, 10/1/10, Michael Kay <mike@xxxxxxxxxxxx> wrote:

>
From: Michael Kay <mike@xxxxxxxxxxxx>
> Subject: Re:  Mapping from two
sources
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Date: Friday, October 1, 2010,
5:13 PM
>   On 01/10/2010 8:14 PM,
> sudheshna iyer wrote:
> 
> Grouping
handles this well:
> 
> <xsl:for-each-group select="$doc1//OrderLine,
>
$doc2//POOrderline" 
> group-by="OLN">
> <Oline>
> <OLN><xsl:value-of
>
select="current-grouping-key()"></OLN>
> <xsl:copy-of
select="current-group()/(FName, ID)"/>
> </Oline>
> </xsl:for-each-group>
> 
>
Michael Kay
> Saxonica
> 
> > I need to have two sources:
> >
> > input1 and
input2.
> >
> > input1:
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> >
<Order>
> >     <OrderLine>
> >        
>     <OLN>1</OLN>
> >        
>    
<Fname>aa</Fname>
> >     </OrderLine>
> >     <OrderLine>
> >        
>    
<OLN>2</OLN>
> >        
>     <Fname>bb</Fname>
> >    
> </OrderLine>    
>
> </Order>
> >
> >
> > input2:
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> > <POOrder>
> >     <POOrderLine>
> >        
>     <OLN>1</OLN>
> >        
>     <ID>123</ID>
> >        
>     <LName>aa</LName>
> >     </POOrderLine>
> >     <POOrderLine>
> >        
>     <OLN>2</OLN>
> >        
>    
<ID>324</ID>
> >        
>     <LName>bb</LName>
> >    
> </POOrderLine>   
> > </POOrder>
> >
> > I need the output from both sources combined. Please
>
note that first two elements are coming from input1 and
> thrid element is
from input2. What is the
> > optimal way of doing this?
> >
> > <?xml
version="1.0" encoding="ISO-8859-1"?>
> > <OrderResponse>
> >     <Oline>
> >
       
> <OLN>1</OLN>
> >        
> <Fname>aa</Fname>
> >        
>
<ID>123</ID>
> >     </Oline>
> >     <Oline>
> >        
> <OLN>2</OLN>
> >
       
> <Fname>bb</Fname>
> >        
> <ID>324</ID>
> >     </Oline>
> >
</OrderResponse>
> >
> >
> >
> >
> >
>
--~------------------------------------------------------------------
> >
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> > To
unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
> > or
e-mail:<mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>
> > --~--
> >
> >
> 
> 
> --~------------------------------------------------------------------
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> To
unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
> or e-mail:
<mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>
> --~--

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.