Subject: RE: [xsl] divide info in several output files From: "Tapan Nanawati" <tapan_nanawati@xxxxxxxxx> Date: Sat, 3 Mar 2001 02:46:46 +0530 |
try these XML's and XSL's solution posted a few days back XSL : ----------- <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"> <xsl:param name="number">2</xsl:param> <xsl:template match="category"> <html> <title> hello </title> <body> <xsl:apply-templates select="file[position() mod $number = 4]"/> </body> </html> </xsl:template> <xsl:template match="file"> <category1> <!--xsl:apply-templates/--> <xsl:copy-of select=".| following-sibling::file[position() < $number]"/> </category1> </xsl:template> </xsl:stylesheet> XML: ------------ <?xml version="1.0"?> <?cocoon-process type="xslt"?> <?xml-stylesheet href="category.xsl" type="text/xsl"?> <category> <file>file1</file> <file>file2</file> <file>file3</file> <file>file4</file> <file>file5</file> <file>file6</file> <file>file7</file> <file>file8</file> <file>file9</file> <file>file10</file> <file>file11</file> <file>file12</file> <file>file13</file> <file>file14</file> <file>file15</file> <file>file16</file> <file>file17</file> <file>file18</file> <file>file19</file> <file>file20</file> <file>file21</file> <file>file22</file> <file>file23</file> <file>file24</file> <file>file25</file> <file>file26</file> <file>file27</file> </category> Keep on changing the value of $number to get as many entries per page as you want. cheers Tapan Nanawati tapan_nanawati@xxxxxxxxx 91-11-6685274 (o) 91-98112-98982 (m) New Delhi - INDIA ------------------------------ God is real, unless declared integer. $-----Original Message----- $From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx $[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Aniceto López $Sent: Thursday, March 01, 2001 9:30 PM $To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx $Subject: [xsl] divide info in several output files $ $ $hello everybody; $ $I don`t know how to face this problem: $ $one xml file with a long list of items (28 i.e.) $<whatever> $ <anything>ryur54wrthigyuif</anything> $ <anything>ryureicnsd45gkjuif</anything> $ <anything>ihdftuiwtusd78yrt</anything> $ <anything>.................. $</whatever> $ $I need to output a html with a few (10 i.e.) of this itens $and a link to other page containing the next 10 and $so on til the last page including the last 8 items. $ $The quantity of items can be different from one xml file $to another so no quantity-dependant-solution $ $is there any idea/solution for this? $thanks in advance $ $ani lopez $ $ $ $ $ $ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] divide info in several ou, cutlass | Thread | Re: [xsl] divide info in several ou, Cristobal Galiano Fe |
[xsl] [exsl] EXSLT 1.0 - Common, Se, Jeni Tennison | Date | Re: [xsl] XML/XSL replace Java Appl, Peter Flynn |
Month |