[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
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
|