ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> exslt
exslt
RE: [exslt] RE: date.msxsl.xsl
by Chris Bayes other posts by this author
Mar 24 2002 6:24PM messages near this date
Re: [exslt] RE: date.msxsl.xsl | [exslt] date.js with .Net System.Xml.Xsl
>  > By the way I noticed the EXSLT functions date:hour-in-day,
>  > date:minute-in-hour and date:second-in-minute are called in
>  > date.msxsl.xsl date:hourInDay, date:minuteInHour and
>  > date:secondInMinute. Is this correct or a previous version of the
>  > functions??
>  
>  JavaScript doesn't allow hyphens in function names, unlike XPath. In
>  the XSLT 1.1 WD there was a suggestion that the implementations should
>  do a mapping so that if you call a function with date:hour-in-day()
>  then the implementation should detect that you mean the function
>  date:hourInDay(). MSXML doesn't do that, though, so if you use the
>  JavaScript versions of the functions then you have to use the
>  non-hyphenated version (i.e. camelCase version) of the function names.
>  But they should work in exactly the same way.
>  
If you are doing the transformations in script then you can make use of
the scriptlet at
http://www.bayes.co.uk/xml/index.xml?/xml/utils/dates/datetimes.xml
You would use it something like

var oDT = new ActiveXObject("exslt.datetimes");
processor.addObject(oDT, "http://exslt.org/dates-and-times");

You can then use date:hour-in-day, date:minute-in-hour and
date:second-in-minute etc

Ciao Chris

XML/XSL Portal
http://www.bayes.co.uk/xml

_______________________________________________
exslt mailing list
list@[...].org
http://www.exslt.org/list
Thread:
Rindahl, Bruce
Jeni Tennison
Chris Bayes

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved