Subject: General question, is it possible to? From: Pål Steven Eriksen <pserik@xxxxxxxxxxx> Date: Mon, 29 May 2000 13:27:50 +0200 |
This is my start point. I have a list of news headline in a column and when I click on one I get that particular news in cell next to this one. I use two <xsl:for-each select> to achieve the list of news headlines, some variables are made and I use onclick and some JavaScript to show what the news contain. Problem then is if I have many news headlines I have to scroll down to click on news headline and then up again to read it (if it's at the bottom). Is it possible in xsl to after a certain amount of news to insert a tag/button or whatever for each 10 news (in the output), so I will only see 10 listing at a time and a new tag/button for each 10. Then when I click the tag it will show the next 10 and so on. I now I can make a counter and show only the ten first, but is it possible to store the position where I am and continue on users demand. How about the position if you have 50 listings and are showing 30-40, then you want to show 20-40. I'll appreciate any point of view, i may be attacking this from wrong angle, but... Regards Steven xml code is like this: <main_news> <news> <gen_date>29.5.2000</gen_date> <mainheadline>mainheadline</mainheadline> <summary>summary</summary> <title head="headline1">this is what this headline contain</title> <title head="headline2">this is what this headline contain</title> </news <news> ... </news> <main_news> Here is part of the xsl code which do the for-each ... : <table border="0" cellpadding="2" cellspacing="8" width="100%"> <td valign="top" width="24%" bgcolor="#009999"> <xsl:attribute name="summr"><xsl:value-of select="main_news/news/summary"/></xsl:attribute> <font size="2" face="Arial"> <xsl:for-each select="/main_news/news"> <xsl:choose> <xsl:when test="mainheadline"> <strong onmouseover="this.style.color='#FFFFCC'" onmouseout="this.style.color='black'" onclick="writeElement('mainH',head,'txtbody',summr,'gdato',dato)"> <xsl:attribute name="head"><xsl:value-of select="mainheadline"/></xsl:attribute> <xsl:attribute name="summr"><xsl:value-of select="summary"/></xsl:attribute> <xsl:attribute name="dato"><xsl:value-of select="gen_date"/></xsl:attribute> <xsl:value-of select="mainheadline"/> </strong> </xsl:when> </xsl:choose> <xsl:for-each select="./title"> <xsl:choose> <xsl:when test="./@head"> <div onmouseover="this.style.color='#FFFFCC'" onmouseout="this.style.color='black'" onclick="writetitle('txtbody',innmat,'mainH',head,'gdato',dato)"> <xsl:attribute name="innmat"><xsl:value-of select="./."/></xsl:attribute> <xsl:attribute name="head"><xsl:value-of select="../mainheadline"/></xsl:attribute> <xsl:attribute name="dato"><xsl:value-of select="../gen_date"/></xsl:attribute> <xsl:value-of select="./@head"/></div> </xsl:when> </xsl:choose> </xsl:for-each><br/> </xsl:for-each> </font> </td> </tr> </table XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: can we use html objects in xsl, Mike Brown | Thread | Re: General question, is it possibl, Dan Morrison |
Re: Problem with Syntax of cgi-type, Paulo Gaspar | Date | RE: General question, is it possibl, Igor Nakshin |
Month |