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: [newbie]use of xsl:if {RE: XSL to handle display mutiple pages}


>   I started working on XSL to handle display mutiple pages in 
> HTML.  The
> idea I tried was simple, count number of records until max 
> records per page
> reaches.  At that time, I close of the current page/table, 
> add a page break
> and start the next page/table.  But such logic seems does not 
> seems to be
> allowed in xsl blocks such as xsl:if.

It sounds simple, but XSLT isn't that kind of programming language. It is
stateless and non-sequential, so you can't count things in a variable and
take action when the variable reaches a particular value. Think in terms of
functions: how does the input relate to the output. If you want to generate
an object in the output that corresponds to 20 objects in the input, write a
template rule that reads 20 objects from the input and writes one object in
the output.

Mike Kay
> 




 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]