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?


0
deutronium (13)
7/13/2005 10:58:59 PM
dotnet.xml 7266 articles. 0 followers. Follow

5 Replies
1281 Views

Similar Articles

[PageSpeed] 10

> > 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..


0
deutronium (13)
7/14/2005 9:10:48 AM
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
0
Oleg
7/14/2005 9:38:24 AM
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-us/dnxml/html/practexslt.asp
-- 
Oleg Tkachenko [XML MVP, MCAD]
http://www.xmllab.net
http://blog.tkachenko.com
0
Oleg
7/14/2005 11:01:18 AM
"Oleg Tkachenko [MVP]" <oleg@NO!SPAM!PLEASEtkachenko.com> schrieb im 
Newsbeitrag news:Okl97rFiFHA.2444@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?


0
deutronium (13)
7/14/2005 4:33:56 PM
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
0
Oleg
7/18/2005 9:10:03 AM
Reply:

Similar Artilces:

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? > > 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() exten...