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

Re: Using XSL for a "world records" table

Subject: Re: Using XSL for a "world records" table
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Sun, 18 May 2003 07:51:57 +0200
speedcubing videos
> http://www.speedcubing.com/records/recs_cube_333.html
>
> I have succeeded in handling the basic requirements in xsl, but I have
> run into a few problems:
>
> - notice in the existing records page that two people are tied for first
>   place. In this case, they should both have "1" in the "Place" column.
>   My current approach fails: when I sort on the time column and use the
>   value of position() for place, it unfairly gives one of them second
>   place. Is there another way?

Yes, it is called grouping. You can learn more about the Muenchian method
for grouping at:
http://www.jenitennison.com/xslt/grouping/index.html

>
> - recent records are given a yellow background so they stand out. To do
>   this, I need to test if the record date is greater-than 14 days ago.
>   My current idea for this is to store dates in yyyymmdd format, and
>   pass the date of 14 days ago as an xsl parameter. Then colour yellow
>   each record if its date is greater than the parameter. Can anyone
>   think of a better way that doesn't require such a parameter?
>
> - the time field needs to be formatted for any value from hundredths of
>   a second up to days or years. Will I need to write my own extension
>   function to do the formatting, or does one exist already?


I use the datetime_lib.xsl library, distributed with Xselerator (you can
just download the trial version).

A long time ago I wrote an XSLT Calendar application using this library -- 
this can be obtained at:

http://www.topxml.com/code/default.asp?p=3&id=v20020711152545



=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL




 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.