ASP Error: 70
Description: Permission denied
Source: Microsoft VBScript runtime error

[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Comparing two large stylesheets

Subject: RE: Comparing two large stylesheets
From: "Bryan Rasmussen" <bry@xxxxxxxxxx>
Date: Wed, 27 Mar 2002 18:03:50 +0100
bar bry doc 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"

><xsl:template match="*"> //on file1
>  <xsl:copy>
>     <xsl:apply-templates select="document($file2)//*[name()=.]"/>
>  </xsl:copy>
></xsl:template>

it seems to me you need mainly to match templates, right? how about you copy
the node of a template into a parameter, then compare it with what you got
in $file2

something like:
(I prefer using the temp prefix for the xsl namespace if I'm matching
against xsl)
<temp:template match="xsl:template">
<temp:param name="match" select="@match"/>
<temp:param name="templatContent"><xsl:copy-of select="."/></xsl:param>
<temp:apply-templates select="$doc//xsl:template[@match=$match]">
<temp:with-param name="templatContent" select="$templatContent"/>
</temp:apply-templates>
</temp:template>
obviously that doesn't do the whole thing but that way you can build a
matcher, for example with
 <temp:if test="contains($doc//xsl:template/@match,$match)">
or so on



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.