xsl-list
[Top] [All Lists]

Re: [xsl] Merging structure and content by own id with XSLT 2.0

2010-03-23 12:51:08
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(_at_)saxonica(_dot_)com> 
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

--~------------------------------------------------------------------
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(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>