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

Re: date formating

Subject: Re: date formating
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Mon, 20 Aug 2001 16:14:19 +0100
Re:  date formating
Hi Roman,

> I'm a new to this list so I don't know what XSLT processor you are
> talking about but I'd suspect that node is passed into your
> extension function.
> I use Xalan processor and the way it would work is that for
> <xsl:variable name="moreover-date"
>       select="harvest_time" />
> if would store a node/Element in the variable.
> Easiest fix I think would be change it to look like:
> <xsl:variable name="moreover-date">
>         <xsl:value-of select="harvest_time" />
> </xsl:variable>
>
> In this case the text value is stored in the variable.

That's not quite true. In the second case, the $moreover-date variable
holds a result tree fragment, a little node tree whose root node has a
single child -- a text node with the value of the harvest_time
element. If you want the variable to hold a string, then you should
use:

  <xsl:variable name="moreover-date" select="string(harvest_time)" />

But I think that Xalan does a pretty good job of converting the
arguments that you pass in to extension function to the types of the
arguments that you've declared on the methods, at least in Java, so
you don't have to worry too much about passing in the wrong kind of
object (unlike in MSXML/JavaScript).

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 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.