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

Cart








