sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
Keith Chadwick's Avatar

ms:format-date() ?


Question posted by: Keith Chadwick (Guest) on November 12th, 2005 02:09 AM
Been trying to use the ms:format-date() in one of my transformations.

I have all of the necessary declarations in my xml as in

<?xml version="1.0" ?>
<data xml:space="default"
xmlns:dt="urn:schemas-microsoft-com:datatypes">
myxml...
</data>

And my transformation:

<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ms="urn:schemas-microsoft-com:xslt"
xmlns:dt="urn:schemas-microsoft-com:datatypes">

<xsl:template match="/" >
<xsl:value-of select="ms:format-date(@testdatefromdatabase,'MMM dd,
yyyy')"/>
</xsl:template>
</xsl:stylesheet>

I keep getting the message that it does not recognize the ms namespace even
though it is declared.

I have the MSXML4.0 SDK installed. Could it be because I am calling the xml
transformation through the .NET XSLTransform object which does not recognize
this namespace?

Your input?

Cheers
Keith Chadwick



1 Answer Posted
Oleg Tkachenko's Avatar
Guest - n/a Posts
#2: Re: ms:format-date() ?

Keith Chadwick wrote:
[color=blue]
> I have the MSXML4.0 SDK installed. Could it be because I am calling the xml
> transformation through the .NET XSLTransform object which does not recognize
> this namespace?[/color]

XslTransform class doesn't support ms:format-date() extension function.
You can get the same functionality with date:format-date function of
EXSLT (via EXSLT.NET implementation).
--
Oleg Tkachenko
XML Insider
http://www.tkachenko.com/blog

 
Not the answer you were looking for? Post your question . . .
196,848 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 196,848 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Community Contributors