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

Re: Remove node after testing for equality using value

Subject: Re: Remove node after testing for equality using value from external xml document
From: Jon Gorman <jonathan.gorman@xxxxxxxxx>
Date: Fri, 10 Feb 2006 07:31:42 -0600
remove node
On 2/10/06, Evans, Martin Chf Tech <Martin.Evans934@xxxxxx> wrote:
> Jon,
>
> Thanks for being patient,I like the use of keys to identify the
> particular element value to do the transform. But the wild stab wasn't
> quite what I had in mind. I want to comment out complete nodes in the
> context xml file that have corresponding part no's in the lookup xml
> file.

Ah, typing a bit in a hurry (and I think confused myself with the part
number removed), but it's pretty easy to change the templates.

<xsl:template match="partno">

change this to be whatever the equivlent to hardware was. (Thread view
isn't joining them so I don't have a view of it)
ie
<xsl:template match="hardware" >


and change the key to
<xls:when "key('k', partno/@code,document('lookup.xml')) != ''">

'k', is the name of the key (I think, been a little while look at the faq)
partno/@code as the lookup
document('lookup.xml') is the source for the keying.

Jon Gorman

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.