xsl-list
[Top] [All Lists]

Re: [xsl] How to do a diff of two HTML files with HTML output

2008-10-28 16:46:56

The current stable release is XMLUnit 1.2, June 2008.

XMLUnit for Java provides two JUnit extension classes, XMLAssert and
XMLTestCase, and a set of supporting classes (e.g. Diff,
DetailedDiff,Transform,SimpleXpathEngine,Validator,NodeTest) that allow
assertions to be made about:

    * The differences between two pieces of XML
    * The outcome of transforming a piece of XML using XSLT
    * The evaluation of an XPath expression on a piece of XML
    * The validity of a piece of XML
    * Individual nodes in a piece of XML that are exposed by DOM Traversal

XMLUnit for Java can also treat HTML content (even badly-formed HTML) as valid
XML to allow these assertions to be made about the content of web pages too.

http://xmlunit.sourceforge.net/




Quoting Michael Müller-Hillebrand <mmh(_at_)cap-studio(_dot_)de>:

Am 24.10.2008 um 16:02 schrieb Aaron Gray:

I was wondering if it possible to produce a [X]HTML diff using XSLT
1.0.

Basically I want as output an [X]HTML file with strike through in
red =
for anything deleted from a file and in red for anything added.

Does anything like this already exist, if not how would I go about =
programming it in XSL ?

I am monitoring this question since I hoped to get some pointers to
XML diff tools, that can either create a composite XML with some
additional markup to show the differences (inserts, changes,
deletions) or create modified versions of the compared document to
show the changes.

I guess that using XSLT would be the wrong tool for a full-fledged
diff solution (especially the Longest Common Substring algorithm), but
XSLT would be great to process a diff result in certain ways.

Thanks,

- Michael

--
_______________________________________________________________
Michael Müller-Hillebrand: Dokumentations-Technologie
Adobe Certified Expert, FrameMaker
Lösungen und Training, FrameScript, XML/XSL, Unicode
<http://cap-studio.de/> -- Tel. +49 (9131) 28747




--~------------------------------------------------------------------
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>
--~--






----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

--~------------------------------------------------------------------
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>