xsl-list
[Top] [All Lists]

Re: [xsl] Date, Number Format

2007-10-23 00:50:37
Microsoft don't have a 2.0 processor, it's being developed, cheque's in the post etc.
You can, as others wrote, use Saxon with .NET.
If you are stuck with Microsoft's offerings then their is an msxsl: format-date extension if you're using MSXML (the COM library). Using Xsl(Compiled)Transform you have a choice of using extension functions written in .NET, using extension objects, inline code in .NET or JavaScript, writing your own string manipulation or using a third-party XSLT based library.

Joe
http://joe.fawcett.name


From: "Waqar Ali" <waqarali_pk(_at_)hotmail(_dot_)com>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Date, Number Format
Date: Mon, 22 Oct 2007 16:12:33 -0400

Does MS has a XSLT 2.0 version? This page says they dont?
http://blogs.msdn.com/xmlteam/archive/2007/01/29/xslt-2-0.aspx#5274169

Gurus please confirm!

Is there a XSLT 2.0 parser out there that works on .net?

Thanks,
-Waqar

From: cknell(_at_)onebox(_dot_)com
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Date, Number Format
Date: Mon, 22 Oct 2007 15:50:40 -0400

You will have to use string manipulation to do this. (e.g., substring-before(), substring-after(), etc.)
--
Charles Knell
cknell(_at_)onebox(_dot_)com - email



-----Original Message-----
From:     Waqar Ali <waqarali_pk(_at_)hotmail(_dot_)com>
Sent:     Mon, 22 Oct 2007 15:45:04 -0400
To:       xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject:  Re: [xsl] Date, Number Format

Thanks Ken for your quick reply.

I used the following page to determine the XSLT version and it came out
version 3 of MSXML2 in Replace mode:
http://www.bayes.co.uk/xml/index.xml?/xml/utils/instalmsxml.xml

However when I used the XslCompiledTransform.Transform to tranform my file,
the version came out 1. How can I point my .net code to use XSLT 2.0?

Is there a way I can do the date formating in XSLT 1.0?

Thanks,
-Waqar

>From: "G. Ken Holman" <gkholman(_at_)CraneSoftwrights(_dot_)com>
>Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
>To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
>Subject: Re: [xsl] Date, Number Format
>Date: Mon, 22 Oct 2007 15:19:55 -0400
>
>At 2007-10-22 14:56 -0400, Waqar Ali wrote:
>>How can I format the dat-time field to MMDDYYYY format?
>
>In XSLT 2.0 you use format-dateTime:
>
>   http://www.w3.org/TR/2007/REC-xslt20-20070123/#format-date
>
>>Also numeric fields to 999v99 format?
>
>Not sure what that format is ... can you explain what kind of number is the
>source for that rendering?
>
>>How can I determine which version of XSLT is installed on my machine.
>
>You get a string value representing a number in return to the function:
>
>   system-property('xsl:version')
>
>I hope this helps.
>
>. . . . . . . . . Ken
>
>--
>Comprehensive in-depth XSLT2/XSL-FO1.1 classes: Austin TX,Jan-2008
>World-wide corporate, govt. & user group XML, XSL and UBL training
>RSS feeds:     publicly-available developer resources and training
>G. Ken Holman                 mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
>Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
>Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
>Male Cancer Awareness Jul'07  http://www.CraneSoftwrights.com/s/bc
>Legal business disclaimers:  http://www.CraneSoftwrights.com/legal
>
>
>--~------------------------------------------------------------------
>XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
>or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
>--~--
>



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--