[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XML Differences
Carlos Sanchez wrote:
Hi,I have done something along that line. However the result was very picky (as expected from an automatic comparison tool), and I did not find any way of making it better. My "tool" (what a great name for what I did) does this: File 1: <asdf> <qwerty> <poiuyy fwefew="1" /> text </querty> <test /> </asdf> File 2: <asdf> <qwerty> <poiuyy fwefew="2" /> different text </querty> </asdf> Result: <asdf> <qwerty> <xsl:choose> <xsl:when test="$mode=1"> <poiuyy fwefew="1" /> text </xsl:when> <xsl:when test="$mode=2"> <poiuyy fwefew="2" /> different text </xsl:when> </xsl:choose> </querty> <xsl:choose> <xsl:when test="$mode=1"> <test /> </xsl:when> </xsl:choose> </asdf> So, this is a document that inserted in a proper stylesheet (which sets the mode param, among other things) is capable to output each of the input documents. I conceived this as a compression method for a set of similar (template-based) XHTML files. I found some trouble when extending that to 3 or more files (not that it is not possible, but I did not have enough time. The idea I had for the extension was taking the output of the first transform as file 1 and re-transform it with a third file as file 2. There is some support for that in my code, but it is not tested, and will break if the input files are XSL files, as I treat xsl:choose and xsl:when different from other elements. Removing that should not be that hard... I found more trouble when I discovered that my XHTML files were not exactly template-based, so my combined version was nearly as big as the sum of two of the documents. I would give it away. Just ask me if that is what you need. Antonio Fiol XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|