472,145 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

unknown xslt function "format-dateTime"

Iam using Beta2 of VS2005 and getting the error "Error 4 'format-dateTime()'
is an unknown XSLT function" at the following line:

<xsl:value-of select="format-dateTime($pubDate,'[FNn] [D] [MNn] [Y]
[h]:[m01] [PN]')" />

how can I get around this?
Nov 12 '05 #1
5 11255
cody wrote:
Iam using Beta2 of VS2005 and getting the error "Error 4 'format-dateTime()'
is an unknown XSLT function" at the following line:


format-dateTime() is XPath2.0/XSLT2.0/XQuery1.0 function. VS2005 only
supports XPath1.0/XSLT 1.0. Use ms:format-date() extention function
instead, it's supported by MSXML4 and VS2005.

--
Oleg Tkachenko [XML MVP, MCAD]
http://www.xmllab.net
http://blog.tkachenko.com
Nov 12 '05 #2
> > Iam using Beta2 of VS2005 and getting the error "Error 4
'format-dateTime()'
is an unknown XSLT function" at the following line:


format-dateTime() is XPath2.0/XSLT2.0/XQuery1.0 function. VS2005 only
supports XPath1.0/XSLT 1.0. Use ms:format-date() extention function
instead, it's supported by MSXML4 and VS2005.


Oh my gosh, is MS sh*tting me? VS2005 is in its beta phase and already
obsolete?
This is so funny that it hurts..

Is your proposed function windows specific or do I have chances that my code
will run with MONO .NET or my XSL file will render correctly in non-internet
explorer browsers?

Iam very new to XML and impressed by the unbelievable complexity of this
field..
Nov 12 '05 #3
cody wrote:
Oh my gosh, is MS sh*tting me? VS2005 is in its beta phase and already
obsolete?
Well, in some sense any modern software is obsolete WRT technologies to
be released sometimes next year.
Is your proposed function windows specific or do I have chances that my code
will run with MONO .NET or my XSL file will render correctly in non-internet
explorer browsers?
That's Microsoft specific extension function. Probably Mono will
implement this function too, you better ask in Mono user list.
For a portable server side solution I'd recommend using EXSLT extentions
[1], but EXSLT.NET isn't ported to .NET 2.0 yet. And for browsers using
extenstion functions is even more troublesome. For IE you can use EXSLT
functions implemented in Javascipt -
http://exslt.org/date/functions/format-date/index.html, and AFAIK
Firefox doesn't support XSLT extension functions yet.
Iam very new to XML and impressed by the unbelievable complexity of this
field..

That's not different from any other field. Any technology with such high
level of adoption becomes complex in several years. Till something
simpler is born, just like XML was born in attempt to get rid of SGML
complexity.

[1] http://msdn.microsoft.com/library/en...practexslt.asp
--
Oleg Tkachenko [XML MVP, MCAD]
http://www.xmllab.net
http://blog.tkachenko.com
Nov 12 '05 #4
"Oleg Tkachenko [MVP]" <oleg@NO!SPAM!PLEASEtkachenko.com> schrieb im
Newsbeitrag news:Ok**************@tk2msftngp13.phx.gbl...
cody wrote:
Oh my gosh, is MS sh*tting me? VS2005 is in its beta phase and already
obsolete?


Well, in some sense any modern software is obsolete WRT technologies to be
released sometimes next year.
Is your proposed function windows specific or do I have chances that my
code
will run with MONO .NET or my XSL file will render correctly in
non-internet
explorer browsers?


That's Microsoft specific extension function. Probably Mono will implement
this function too, you better ask in Mono user list.
For a portable server side solution I'd recommend using EXSLT extentions
[1], but EXSLT.NET isn't ported to .NET 2.0 yet. And for browsers using
extenstion functions is even more troublesome. For IE you can use EXSLT
functions implemented in Javascipt -
http://exslt.org/date/functions/format-date/index.html, and AFAIK Firefox
doesn't support XSLT extension functions yet.


So what shall I do if EXSLT.NET isn't ported to .NET and I can't use IE in
my application?
Is there another way which actually works?
Nov 12 '05 #5
cody wrote:
So what shall I do if EXSLT.NET isn't ported to .NET and I can't use IE in
my application?
Is there another way which actually works?


Lots of. Custom extension function, XSLTSL
(http://xsltsl.sourceforge.net/), ms:format-date() etc.

--
Oleg Tkachenko [XML MVP, MCAD]
http://www.xmllab.net
http://blog.tkachenko.com
Nov 12 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by phmyhn | last post: by
5 posts views Thread by Robin Tucker | last post: by
16 posts views Thread by Al Reid | last post: by
3 posts views Thread by shill57957 | last post: by
reply views Thread by Saiars | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.