Using date functions w/ xalan-j_2_4_D1

"Peter Baxter" <[email protected]>
Newsgroups gmane.text.xml.xslt.extensions
Message-ID <[email protected]>
Hi all.....

Did anyone manage to resolve this issue?  I'm having the same problem ... again with the date-format()
stuff and Xalan (except with xalan-j_2_6_0)...

Same function (date:)

Same error (as you can see, I was specific with the path for 'paddingstr.padding.function.xsl'  - but unlike Chris continue to get the error)

"Line #9; Column #47; XSLT Error (javax.xml.transform.TransformerConfigurationException): javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: Had IO Exception with stylesheet file: str.padding.function.xsl"

XSL example:
<?xml version="1.0" encoding="UTF-8"?>

<?xml-stylesheet type="text/xsl" href="C:\Development\aol\src\calendar\xslt\calendar.xsl"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" extension-element-prefixes="date">

<xsl:import href="date.xsl"/>

<xsl:import href="C:/Projects/AOL/calendar/src/xslt/functions/paddingstr.padding.function.xsl" />

<xsl:output method="html" version="1.0" encoding="ISO-8859-1" indent="yes"/>

<xsl:template name="calendar">

<xsl:param name="today"/>

<!-- Calculate the offset to the first day in this month -->

<xsl:variable name="first-day-offset">

<xsl:text>-P</xsl:text>

<xsl:value-of select="date:day-in-month($today) - 1"/>

<xsl:text>D</xsl:text>

</xsl:variable>

<xsl:variable name="first-of-month" select="date:add($today, $first-day-offset)"/>

<!-- Calculate the offset to the first Sunday before or on the

first of this month -->

<xsl:variable name="first-sunday-offset">

<xsl:text>-P</xsl:text>

<xsl:value-of select="date:day-in-week($first) - 1"/>

<xsl:text>D</xsl:text>

</xsl:variable>

<xsl:variable name="start-of-calendar" select="date:add($first, $first-sunday-offset)"/>

<table id="cal" summary="Calendar for {date:month-name($today)} {date:year($today)}">

<!-- generate caption with name of month plus links to preceding

and following months -->

<tr>

<td class="month-nav" colspan="7">

<xsl:call-template name="preceding-month">

<xsl:with-param name="date" select="$today"/>

</xsl:call-template>

<xsl:value-of select="date:month-name($today)"/>

<xsl:text>&#xa0;</xsl:text>

<xsl:value-of select="date:year($today)"/>

<xsl:call-template name="following-month">

<xsl:with-param name="date" select="$today"/>

</xsl:call-template>

</td>

</tr>

<!-- Call the template with two parameters: where to start and

when to end -->

<xsl:call-template name="calendar-week">

<xsl:with-param name="today" select="$today"/>

<xsl:with-param name="start-date" select="$start-of-calendar"/>

<xsl:with-param name="for-month" select="date:month-in-year($today)"/>

</xsl:call-template>

</table>

</xsl:template>


Any thoughts?

Thanks in advance!

Peter

_______________________________________________
exslt mailing list
[email protected]
http://www.exslt.org/list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.