|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XT days-ago extension function
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








