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

XT days-ago extension function

Subject: XT days-ago extension function
From: Linda van den Brink <lvdbrink@xxxxxxx>
Date: Mon, 9 Aug 1999 14:04:01 +0200
w2css
Hi everyone,

I have a question about one of XT's extension functions. I'm trying to use
the utils:days-ago function to create a What's New page. But it's not doing
anything as far as I can see. I would really like to understand what's
wrong! When I test if the function is available, XT doesn't say it's not
available. My xsl just doesn't select any elements... 

Any help would be appreciated! 

> My xsl (the relevant fragment) is: 
> 
> <xsl:stylesheet  xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"
>   xmlns:utils="http://www.jclark.com/xt/java/Utils"
>   xmlns="http://www.w3.org/TR/REC-html40"
>   result-ns="">
> 
> <xsl:template match="psa">
> 	<html><head><title>What's new on the PSA</title><link
> rel="stylesheet" type="text/css"
> href="../../../styles/intro.css"></link></head><body><table
> class="bannerList"><tr><td class="bannerList">What's
> New</td></tr></table><table style="margin-top: 30px;"><tr><td
> colspan="2"><h4 style="margin-bottom: 10px">Application</h4></td><td
> colspan="1"><h4 style="margin-bottom: 10px">Description</h4></td></tr>
> 		<!-- this works: <xsl:apply-templates
> select="//item[@new='1999-08-08']"/> -->
> 		<xsl:if
> test="extension-function-available('utils:days-ago')">
> 			<xsl:apply-templates
> select="//item[@new='utils:days-ago(0)']"/>
> 			<xsl:apply-templates
> select="//item[@new='utils:days-ago(1)']"/>
> 			<xsl:apply-templates
> select="//item[@new='utils:days-ago(2)']"/>
> 			<xsl:apply-templates
> select="//item[@new='utils:days-ago(3)']"/>
> 			<xsl:apply-templates
> select="//item[@new='utils:days-ago(4)']"/>
> 			<xsl:apply-templates
> select="//item[@new='utils:days-ago(5)']"/>
> 		</xsl:if>
> 	</table></body></html>
> </xsl:template>
> 
> </xsl:stylesheet>
> 
> The XML is like this: 
> 
> <software>
> 	<item new="1999-08-08">
> 		<name>W2CSS</name>
> 		<version>2</version>
> 		<desc>Description goes here...</desc>
> 		<size>859 KB</size>
> 		<url>w2css</url>
> 		<home>http://www.g-foods.com/w2css/</home>
> 		<license>Shareware</license>
> 		<install>Unpack</install>
> 	</item>
> 
> </software>
> 


 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.