home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / XML Utilities / Professional Programmer XSL IDE / Xselerator25.msi / Data.Cab / F36948_testzipWith.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2002-03-16  |  830 b   |  27 lines

  1. <xsl:stylesheet version="1.0"
  2.  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3.  xmlns:myAdd="f:myAdd"
  4. >
  5.   <xsl:import href="zipWithDVC.xsl"/>
  6.   <!-- To be applied on numList.xml -->
  7.   <xsl:output omit-xml-declaration="yes" indent="yes"/>
  8.   <myAdd:myAdd/>
  9.   <xsl:template match="/">
  10.     <xsl:variable name="vFun" select="document('')/*/myAdd:*[1]"/>
  11.  
  12.     <xsl:call-template name="zipWith">
  13.       <xsl:with-param name="pFun" select="$vFun"/>
  14.       <xsl:with-param name="pList1" select="(/*/*)[position() < 6]"/>
  15.       <xsl:with-param name="pList2" select="(/*/*)[position() > 5]"/>
  16.     </xsl:call-template>
  17.   </xsl:template>
  18.  
  19.   <xsl:template match="myAdd:*">
  20.     <xsl:param name="pArg1"/>
  21.     <xsl:param name="pArg2"/>
  22.  
  23.     <xsl:value-of select="$pArg1 + $pArg2"/>
  24.   </xsl:template>
  25.  
  26. </xsl:stylesheet>
  27.