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

retrieve a parameter in the xsl

Subject: retrieve a parameter in the xsl
From: Red Light <skydelta98@xxxxxxxxx>
Date: Mon, 12 Jul 2010 03:41:09 -0700 (PDT)
 retrieve a parameter in the xsl
Hi,

i'm using apache Fop and i want to obtain the pagination under this form:  Page 1 of 12
there is an interesting link in the Apache Fop FAQ http://xmlgraphics.apache.org/fop/fo.html#fo-total-pages

but i'm having trouble to get the wanted result , in my pdf rendering class
i do the tranformation 2 times , the first time i check if there is any problem with the xsl or the xml data then i got and generate the pdf wich is the final rendering so in the first one i retrieve the number of pages and i use the result in the second rendering.


//setup XSLT
TransformerFactory tranFactory = TransformerFactory.newInstance();
Transformer aTransformer = tranFactory.newTransformer(xsltfile);
aTransformer.setParameter("page-count",nbrPages);                 
aTransformer.transform(src, res);
System.out.println("getParameter : "+aTransformer.getParameter("page-count"));


it works the print print the number of pages now in my xslt

i declare a variable like:
<xsl:variable name="page-count"></xsl:variable>

and i'm trying to print it:

<xsl:value-of select="$page-count" />   

but no result ?


and thanks a lot

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-2013 All Rights Reserved.