Re: [xsl] Highlighting changes in a diff report

Subject: Re: [xsl] Highlighting changes in a diff report
From: "Manuel Souto Pico terminolator@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 26 Feb 2015 17:25:48 -0000
Hi Trevor,

I've just seen that I wrote but never sent my reply. Sorry about that!

For me your solution is less useful than a XLST stylesheet, because I don't
know how to customize the output or integrate it in my pipeline process,
but it does the trick perfectly for the time being. Thank you!

I would still need to convert the XML files to HTML, but that's okay.

Cheers,
Manuel

2014-06-13 10:45 GMT+02:00 Trevor Nicholls trevor@xxxxxxxxxxxxxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>:

> There may be better tools than this, but I have used DaisyDiff (
> https://code.google.com/p/daisydiff/ ), which compares HTML not XML. In
> our application most of the XML files are documentation files which are
> going to be viewed in a browser by users anyway, so we just use a variation
> on the standard stylesheet to produce HTML for the diff tool. We also had a
> stylesheet which effectively produced an HTML source listing of the XML for
> comparison purposes b that would pick up attribute and element changes
that
> werenbt necessarily reflected in the standard HTML.
>
>
>
> cheers
>
> T
>
>
>
> *From:* Manuel Souto Pico terminolator@xxxxxxxxx [mailto:
> xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx]
> *Sent:* Friday, 13 June 2014 11:13 a.m.
> *To:* xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> *Subject:* [xsl] Highlighting changes in a diff report
>
>
>
> Hi there,
>
>
>
> I am looking for ways to create a HTML report of a comparison between two
> versions of a XML file, so basically I would need to create a function that
> compares the original file with the edited version. I would like to display
> the differences with some formatting as in a word processor's track
> changing mode.
>
>
>
> For example (simplified case), given the two XML files, i.e. Orig.xml:
>
>
>
> <doc>
>
> <string>This is a string</string>
>
> </doc>
>
>
>
> and Edited.xml:
>
>
>
> <doc ver="new">
>
> <string>This is a text</string>
>
> </doc>
>
>
>
> I would like the output report to show something like this:
>
>
>
> ...
>
> <td>This is a <span style="color: red;"><del>string</del></span><span
> style="color: blue;"><ins>text</ins></span></td>
>
> ...
>
>
>
> Before I start getting my head around this, I wanted to have an expert's
> opinion: Can this be done easily with XSLT? (for a basic-level programmer
> like me, that is)
>
>
>
> I know formatting the output in HTML is not a problem, but finding the
> exact differences between the two files might be. Only text content of some
> elements (and always the same kind of element) should vary, not the
> structure of the document.
>
>
>
> My first preference would be to create a stylesheet because I can
> integrate it in my workflows, but if this is difficult a ready-made tool
> would be good as well as long as it's not too expensive (DeltaXML is too
> expensive).
>
>
>
> I hope someone can advise and even point me in the right direction. Thank
> you very much in advance.
>
>
>
> Cheers,
>
> Manuel
>
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
>
> EasyUnsubscribe <http://-list/1349719> (by email)
>   XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <-list/2528023> (by
> email <>)

Current Thread