![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: xsl date format issue >Thread Next - Re: xsl date format issue Re: xsl date format issueTo: NULL Date: 7/8/2007 1:30:00 PM
kamkaro wrote:
> Thanks Martin. I have to say, you have very strong knowledge about XML. i
> have two more questions, first i m using Java base parser so can i use
> Microsoft stuff, second according to your reply you give me the following
> code;
> <xsl:value-of
> xmlns:msxsl="urn:schemas-microsoft-com:xslt"
> select="msxsl:format-date('2001-03-06', 'MMMM dd, yyyy', 'en-US')"/>
>
> how do i call the date element's data, e.g i m doing
> <xsl:template match="Date">
> <xsl:value-of select="." />
> </xsl:template>
An XSLT processor implemented in Java does very likely not implement
those MS specific extension functions my suggested solution uses. It
might offer other extension functions, in particular the possibility to
use Java objects and methods but I am not familiar with that. Try a
forum/newsgroup/mailing list dedicated to that XSLT processor you use.
As for the template, you would simply use
<xsl:template match="Date">
<xsl:value-of
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
select="msxsl:format-date(., 'MMMM dd, yyyy', 'en-US')"/>
</xsl:template>
assuming Date has contents in the form yyyy-mm-dd and you are using
MSXML 4 or later or XslCompiledTransform.
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
