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 / F37548_testFoldlJeni.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2001-11-07  |  1.4 KB  |  40 lines

  1. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  2. xmlns:msxsl="urn:schemas-microsoft-com:xslt"
  3. xmlns:pGenerator="pGenerator"
  4. xmlns:pController="pController"
  5. exclude-result-prefixes="xsl pGenerator pController"
  6. >
  7.   <xsl:import href="buildListWhile.xsl"/>
  8.  
  9.   <xsl:output indent="yes" omit-xml-declaration="yes"/>
  10.  
  11.   <pGenerator:pGenerator/>
  12.   <pController:pController/>
  13.  
  14.   <xsl:variable name="vMyGenerator" select="document('')/*/pGenerator:*[1]"/>
  15.   <xsl:variable name="vMyController" select="document('')/*/pController:*[1]"/>
  16.  
  17.   <xsl:template match="/">
  18.     <xsl:call-template name="buildListWhile">
  19.       <xsl:with-param name="pGenerator" select="$vMyGenerator"/>
  20.       <xsl:with-param name="pController" select="$vMyController"/>
  21.       <xsl:with-param name="pContollerParam" select="10"/>
  22.       <xsl:with-param name="pElementName" select="'indoctrinate'"/>
  23.     </xsl:call-template>
  24.   </xsl:template>
  25.  
  26.   <xsl:template name="listGenerator" match="*[namespace-uri()='pGenerator']">
  27.      <xsl:param name="pList" select="/.."/>
  28.      <xsl:param name="pParams"/>
  29.      I should understand loops as being syntax for a simple form of
  30.      recursion.
  31.   </xsl:template>
  32.  
  33.   <xsl:template name="listController" match="*[namespace-uri()='pController']">
  34.      <xsl:param name="pList" select="/.."/>
  35.      <xsl:param name="pParams"/>
  36.  
  37.      <xsl:if test="count($pList) <= $pParams">1</xsl:if>
  38.   </xsl:template>
  39.  
  40. </xsl:stylesheet>