[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: divide info in several output files

Subject: RE: divide info in several output files
From: "Tapan Nanawati" <tapan_nanawati@xxxxxxxxx>
Date: Sat, 3 Mar 2001 02:46:46 +0530
xslt several output files
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() &lt;
$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:  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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.