Subject: [xsl] xslt pagnation help... From: "Zoe Peng" <zoe@xxxxxxxxxxxx> Date: Fri, 9 Aug 2002 11:42:34 -0400 |
Hi, I have an email service(xml document) which I'll allow user to select pre-defined messages as email subject when user doing the reply function (in wml that transform from xslt). The question for me is I have too much pre-defined message that I want to pagnation them. The pre-defined messages will includes two parts which are user pre-defined and default. I got problem when I have want to click [[More]] to have next page if I devide item into 5. Please help. Thanks. --Zoe --xsl: <?xml version="1.0" ?> <xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0' > <xsl:output doctype- system='http://www.wapforum.org/DTD/wml_1.1.xml'/> <!-- declare param --> <xsl:param name="Page" select="0" /> <xsl:param name="PageSize" select="5" /> <!-- start from here --> <xsl:template match="/"> <wml> <card id="message"> <p> <select name="MAILMSGCONTENT" title="MAILMSGCONTENT"> <xsl:for-each select="tm_email_client/email_session_config/user_email_msgs/email_msg"> <xsl:if test="position() >= ($Page * $PageSize) + 1"> <xsl:if test="position() <= $PageSize + ($PageSize * $Page)"> <xsl:variable name="_usr_em_msg_subj"> <xsl:value-of select="./em_msg_subj"/> </xsl:variable> <option value="{$_usr_em_msg_subj}"> <xsl:value-of select="$_usr_em_msg_subj" /> </option> </xsl:if> </xsl:if> </xsl:for-each> <xsl:for-each select="tm_email_client/email_session_config/default_email_msgs/email_ms g"> <xsl:if test="position() >= ($Page * $PageSize) + 1"> <xsl:if test="position() <= $PageSize + ($PageSize * $Page)"> <xsl:variable name="_def_em_msg_subj"> <xsl:value-of select="./em_msg_subj"/> </xsl:variable> <option value="{$_def_em_msg_subj}"> <xsl:value-of select="$_def_em_msg_subj" /> </option> </xsl:if> </xsl:if> </xsl:for-each> <option onpick="#card">More</option> </select> <a href="#reply">Select</a> <anchor>Back<prev/></anchor> </p> </card> </wml> </xsl:template> </xsl:stylesheet> --xml <?xml version="1.0"?> <!-- <!DOCTYPE tm_email_client SYSTEM 'http://localhost/xml/dtd/tm_email_client.dtd'>--> <tm_email_client statuscode="0" statusdesc="Mail has been read." action="emailreply"> <email_session_config> <user_email_msgs usr_id="user1"> <email_msg> <em_msg_subj>Are you testing?</em_msg_subj> </email_msg> <email_msg> <em_msg_subj>How are you doing?</em_msg_subj> </email_msg> </user_email_msgs> <default_email_msgs> <email_msg> <em_msg_subj>Yes</em_msg_subj> </email_msg> <email_msg> <em_msg_subj>No</em_msg_subj> </email_msg> <email_msg> <em_msg_subj>Please call</em_msg_subj> </email_msg> <email_msg> <em_msg_subj>Pick Up Groceries</em_msg_subj> </email_msg> <email_msg> <em_msg_subj>Call Home</em_msg_subj> </email_msg> <email_msg> <em_msg_subj>Contact School</em_msg_subj> </email_msg> <email_msg> <em_msg_subj>Check Post Box</em_msg_subj> </email_msg> <email_msg> <em_msg_subj>Call Office</em_msg_subj> </email_msg> <email_msg> <em_msg_subj>Appointment Due</em_msg_subj> </email_msg> <email_msg> <em_msg_subj>Appointment Cancelled</em_msg_subj> </email_msg> <email_msg> <em_msg_subj>Busy</em_msg_subj> </email_msg> <email_msg> <em_msg_subj>Will Call Later</em_msg_subj> </email_msg> <email_msg> <em_msg_subj>Call you back</em_msg_subj> </email_msg> </default_email_msgs> </email_session_config> </tm_email_client> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] FO Initial Page Sequence , Charles Knell | Thread | Re: [xsl] xslt pagnation help..., Joerg Heinicke |
[xsl] FO Initial Page Sequence Ques, Schrooten, Ben | Date | Re: [xsl] FO Initial Page Sequence , G. Ken Holman |
Month |