Re: Merging structure and content by own id with XSLT
Micheal, you're the man! Thanks! That's exactly the type of answer I was hoping for. It lays the foundation to a good solution. it's all I needed, thanks. Cheers, Jacobus On Tue, Mar 23, 2010 at 7:09 PM, Michael Kay <mike@xxxxxxxxxxxx> wrote: > > I would start with a for-each-group that selects all the "data elements" > from both files, using group-by="data_id". If there's only one item in the > current-group() you can copy it unchanged. If there are two, they will be in > population order so you know which is the old and which is the new. Then you > just have to do some legwork to compare them. Attributes are easy because > when you add two attributes with the same name to an element, the last one > takes precedence. I haven't tried to work out what your rules on merging > element content are. > > Regards, > > Michael Kay > http://www.saxonica.com/ > http://twitter.com/michaelhkay
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format