I tried to use ms:format-date with XslTransform class to
translate a XML file into an HTML, but it gives me an
error message: "Unhandled Exception:
System.Xml.Xsl.XsltException: Cannot find the script or
external object that implements prefix 'ms'".
I then downloaded MSXML 4.0 and msxsl.exe, and able to
perform the XML to HTML translation without any problems.
How can I make XslTransform class work with ms:format-date?
Thank
John Yung
"John Yung" <john...@opco.com> wrote in message
news:035d01c36675$a509de40$a101...@phx.gbl...
> How can I make XslTransform class work with ms:format-date?
The same functionality can be achieved using EXSLT date:format-date function,
which is available for .NET, see Dare Obasanjo's article and implementation at
MSDN: http://msdn.microsoft.com/library/en-us/dnexxml/html/xml05192003.asp
EXSLT.NET workspace (no released yet, sorry):
http://www.gotdotnet.com/Community/Workspaces/workspace.aspx?id=201eb290-5bf0-4452-9bf7-d21d392
Here is a test using nxslt.exe:
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:date="http://exslt.org/dates-and-times">
<xsl:template match="/">
<xsl:value-of select="date:format-date('2000-02-16T15:56:00', 'MMM
dd, yyyy')"/>
</xsl:template>
</xsl:transform>
produces
Feb 16, 2000
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
> I am also trying to use Exslt. But I do not know how to obtain the
> "Exslt" namespace. Could you help me out.
See original article and implementation by Dare [1] and watch EXSLT.NET
project [2] for first release - probably this month.
[1] http://msdn.microsoft.com/library/en-us/dnexxml/html/xml05192003.asp
[2]
http://www.gotdotnet.com/Community/Workspaces/workspace.aspx?id=201eb290-5bf0-4452-9bf7-d21d39268f36