Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

use ms:format-date with XslTransform class

41 views
Skip to first unread message

John Yung

unread,
Aug 19, 2003, 1:16:36 PM8/19/03
to
Hi,

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

Sergey Dubinets

unread,
Aug 19, 2003, 3:34:40 PM8/19/03
to
The only MS specific extension function System.Xml.Transform implements is
ms:node-set().
--
Sergey
-------
This posting is provided "AS IS" with no warranties, and confers no rights.

"John Yung" <john...@opco.com> wrote in message
news:035d01c36675$a509de40$a101...@phx.gbl...

Oleg Tkachenko

unread,
Aug 20, 2003, 5:08:02 AM8/20/03
to
John Yung wrote:

> 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

Pranav Shah

unread,
Sep 10, 2003, 11:00:53 AM9/10/03
to
I am also trying to use Exslt. But I do not know how to obtain the
"Exslt" namespace. Could you help me out.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Oleg Tkachenko

unread,
Sep 11, 2003, 6:13:20 AM9/11/03
to
Pranav Shah wrote:

> 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

0 new messages