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: Iteration in XSLT



Unless you use an extension, you have to do it via recursion.  Call a named
template from the main template, passing in zero as param, then, if the
counter argument is less than 5, call the same template passing in the
counter param + 1.

A lot of people want a looping mechanism in XSLT, but that would make
incremental processing almost impossible.

-scott




                                                                                                                                 
                    "Chowdhury, Anisuzzaman"                                                                                     
                    <Anisuzzaman.Chowdhury@west        To:     "'xsl-list@mulberrytech.com'" <xsl-list@mulberrytech.com>         
                    group.com>                         cc:     (bcc: Scott Boag/CAM/Lotus)                                       
                    Sent by:                           Subject:     Iteration in XSLT                                            
                    owner-xsl-list@mulberrytech                                                                                  
                    .com                                                                                                         
                                                                                                                                 
                                                                                                                                 
                    03/17/00 10:47 AM                                                                                            
                    Please respond to xsl-list                                                                                   
                                                                                                                                 
                                                                                                                                 




I went through some XSL books and XSLT 1.0 documentation but cannot find
anything except the command <xsl:for-each> on iteration in Stylesheet.
Please consider the following XML document:

<count>5</count>
<Hello>Hello, World!</Hello>

Is it possible to display the text(Hello, World!) five times using XSLT
processor?


Thanks for your responses in advance.

- Anis Chowdhury


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





 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]