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

using xt-extensions for getting a string of date

Subject: using xt-extensions for getting a string of date
From: felix@xxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 7 Mar 2000 16:51:55 +0100
xsl string to date
Hi,

I am trying to use the extent the date.xsl example from the xt-distro.
I want it to print the string for a given date, not the actual date
like that demo does. I tried something like this

<xsl:stylesheet
  version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:date="http://www.jclark.com/xt/java/java.util.Date">

<xsl:template match="/">
  <html>
    <xsl:if test="function-available('date:to-string') and
function-available('date:new')">
      <xsl:variable name="year">2000</xsl:variable>
      <xsl:variable name="month">1</xsl:variable>
      <xsl:variable name="day">2</xsl:variable>
      <p><xsl:value-of select="date:to-string(date:new(2000,1,2))"/></p>
      <p><xsl:value-of select="date:to-string(date:new($year,$month,$day))"/></p>
    </xsl:if>
  </html>
</xsl:template>

</xsl:stylesheet>    


It should give out the strings for the 02.01.2000. But xt just tells
me:
new:illegal arguments

So I think it is trying to give the arguments as strings instead of
integers as the constructor of Date is expecting. How can I get this
to work? I am especially interested in the second case, where I call
date:new with variables.

Thanks in advance.
 Felix Schumacher

ps: I hope this is not to far off-topic.


 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.