This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Comparing two large stylesheets
- From: "Andrew Welch" <awelch at piper-group dot com>
- To: "Xsl-List (E-mail)" <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 27 Mar 2002 16:33:52 -0000
- Subject: [xsl] Comparing two large stylesheets
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi list,
I am looking for way of comparing two large stylesheets. In this instance
they are both very similar, but the templates are in a different order and a
few of the element names they match are slightly different. For example,
file1 ,may have:
xsl:for-each select="foo/bar/quantity"
and file2 have:
xsl:for-each select="for/bar/qty"
I need to find these subtle differences... I could use a file comparer, such
as examdiff, but I would have to order the templates first. I could go
through it manually, but they are both very large and that can hopefully be
avoided. (as well as going through the dtds - thay are both a huge, span
several files)
So, Im a bit stuck for options. I dont mind the examdiff route, but does
anyone know how to order the templates so the order is the same for both
files - something like this:
<xsl:template match="*"> //on file1
<xsl:copy>
<xsl:apply-templates select="document($file2)//*[name()=.]"/>
</xsl:copy>
</xsl:template>
(at the risk of being flamed for my quick-xsl-interpretation)
Or, can anyone do an element by element comparison between templates in two
different files, and hightlight and differences.
Any ideas / suggestions always welcome
cheers
andrew
************************************************************************
*<a href="http://www.thebristoldirectory.com">The Bristol Directory</a>*
************************************************************************
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.338 / Virus Database: 189 - Release Date: 14/03/2002
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list