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

General question, is it possible to?

Subject: General question, is it possible to?
From: Pål Steven Eriksen <pserik@xxxxxxxxxxx>
Date: Mon, 29 May 2000 13:27:50 +0200
steve eriksen
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

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.