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

RE: conditional merge

Subject: RE: conditional merge
From: "Chris Bayes" <chris@xxxxxxxxxxx>
Date: Wed, 29 Aug 2001 17:28:53 +0100
RE:  conditional merge
Kevin,
I'm not sure what you want here but you can restrict what is copied by
changing
<xsl:apply-templates/> to <xsl:apply-templates select="something" />

Ciao Chris

XML/XSL Portal
http://www.bayes.co.uk/xml


> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Kevin_Gutch@xxxxxxxxxxx
> Sent: 29 August 2001 15:16
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  conditional merge
> 
> 
> 
> I am attempting a conditional merge when two elements of 
> different XML files are the same. Using the example below 
> obtained from http://www.dpawson.co.uk/xsl/sect2/merge.html#d154e147
> 
>  <xsl:copy-of 
> select="document('a.xml')//id[.=document('b.xml')//id]"/>
> 
> I can match elements. However, when I attempt to  do a little 
> more processing such as is seen below, I fail to get the 
> desired results.  When the elements match I want it to copy 
> that specific element. However, what I have causes every 
> element to be copied. Any help would be greatly appreciated.
> 
>   <xsl:template match="l_name">
>   <xsl:if 
> test="document('a.xml')//l_name[.=document('b.xml')//_name]">
>     <xsl:copy>
>       <xsl:copy-of select="@*"/>
>       <xsl:apply-templates/>
>     </xsl:copy>
>   </xsl:if>
>   </xsl:template>
>   </xsl:stylesheet>
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 


 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.