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

Re: merging documents/union

Subject: Re: merging documents/union
From: Trevor Nash <tcn@xxxxxxxxxxxxx>
Date: Sat, 15 Dec 2001 14:17:20 +0000
david leuschner
>I need to write a special kind of "union" template that merges two nodesets.
>The structure of these nodesets is not known.
>For example those two <node> elements should be merged to one <node> where
>the
>second overwrites the first:

Have you looked at
http://www.informatik.hu-berlin.de/~obecker/XSLT/#merge
?

Its not exactly what you want, but might be a good place to start.

There is also a thread in the archive about inheritance, again not
exactly what you want, but might give you some ideas:
http://www.biglist.com/lists/xsl-list/archives/200103/msg01509.html

The key to success is being very clear what you mean by 'merge'.  You
mention that if the 'same' element occurs in both node-sets then one
takes precendence over the other: but is sameness based on just the
element name, or do attribute values count too?  Are the documents
ordered?  Is the process recursive (if the 'same' element occurs with
children, you might want to merge the children rather than take just
one set).

Regards,
Trevor Nash
--
Traditional training & distance learning,
Consultancy by email

Melvaig Software Engineering Limited
voice:     +44 (0) 1445 771 271 
email:     tcn@xxxxxxxxxxxxx

 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.