This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: problems in loop creation in a table--help required..


Re: problems in loop creation in a table--help required..

Praveen;

Hopefully you can get your problem solved using suggestions as:

1.  correct the xsl space name  by Chris, Bayes
2   change 'call-template' to 'apply-templates', and 'match'  to 'select' by
Paul Tyson
3.  using generic xslt by Dimitre  (msg01259.html) in following way:

  <xsl:param name="numCols" select="4" />
  <xsl:variable name="source"
select="/configuration_package/configuration/subsystem_id" />
  on the top of your xslt

  Replacing all subsystm id template in your original xslt  with
      <xsl:call-template name="subsystem"/>

  and after the template,  append the named templated subsystem as following

  <xsl:template name="subsystem">
     <xsl:template name="subsystem">
            <xsl:apply-templates mode="multiColumn"
                                 select="$source[position() &lt;=$numCols]">
                <xsl:with-param name="numCols" select="$numCols" />
                <xsl:with-param name="nodes" select="$source" />
            </xsl:apply-templates>
   </xsl:template>

   <xsl:template mode="multiColumn" match="*">
    then  using Dimitre code here    ..

 4.  Do your part in reading material about using xslt element, xpath
commands
     for your goods in the long run.
     Or you can take hard-wired approach as suggested by Paul.

Cheers.

Sun-fu Yang

sfyang@unisvr.net.tw



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]