As a quick hack you could write a simple Java class and plug it into
Xalan. It is very easy, but isn't portable (Xalan-specific). As a
template:
package com.mdnotes.xalanext;
public class MyXalanExtension {
public String truncateMyDateFormat(String theDate) {
return theDate.substring........
}
}
In you stylesheet:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:myext="com.mdnotes.xalanext.MyXalanExtension"
extension-element-prefixes="myext">
[..]
<xsl:value-of select="myext:truncateMyDateFormat(element/@date)"/>
More information here: http://xml.apache.org/xalan-j/extensions.html
On 27.03.2003 19:12:43 Jasmin Mehta wrote:
> The links you have mentioned has excellent source for date time
> functions. But I am receiving a date in XML file that has not matching
> format according to XML Schema Part 2: Datatypes. So I can not use that
> function.
>
> So I am now looking for some string function only that can give me the
> format I want.
>
> Can you help on this? Its not immediate requirement, but it would be
> great If I can figure out something in couple hours.
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]