This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: <MsSinceMidnight1Jan1970>1009843200000</MsSinceMidnight1Jan1970>
- From: Dan Diebolt <dandiebolt at yahoo dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Wed, 17 Apr 2002 17:59:53 -0700 (PDT)
- Subject: RE: [xsl] <MsSinceMidnight1Jan1970>1009843200000</MsSinceMidnight1Jan1970>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Chris, I can't get this working as you describe using NN6.1.
All I get is "1013777148640" displayed. What version of NN did
you try this with?
=========================================
s.xml
<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="s.xsl"?>
<date>1013777148640</date>
s.xsl
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<head>
<script type="text/javascript">
function fixupDates() {
//alert("here");
var dvs = document.getElementsByTagName("div");
//alert(dvs.length);
for (var i=0; i < dvs.length; i++) {
//alert(dvs[i].className);
if (dvs[i].className == "fixDate") {
//alert("here");
d=new Date(parseInt(dvs[i].innerHTML));
//alert(d.toString());
var dd=d.getDate();
var mm=d.getMonth()+1;
var yy=d.getFullYear();
//alert(mm+"/"+dd+"/"+yy);
dvs[i].innerHTML = mm+"/"+dd+"/"+yy;
//alert(dvs[i].innerHTML);
}
}
}
</script>
</head>
<body onload="fixupDates()">
<div class="fixDate"><xsl:value-of select="date"/></div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list