cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerald Michalitz" <gerald.michal...@aon.at>
Subject object rexx script within xslt
Date Wed, 31 Jul 2002 20:40:16 GMT
im trying to use the objectrexx script within an xsltransformation
my xsl-file has this:
<lxslt:component prefix="my-ext" elements="timelapse" functions="calc">
<lxslt:script lang="ObjectRexx">
 <![CDATA[
/* calc rexx - Object Rexx, ---rgf, 2002-07-30, 03:03, wuw */
parse arg mon +3 . day "," year /* parse date */
 due_date = date("s", space(day mon year), "n") /* convert to a sortable
date */
due_days = date("b", due_date, "s") /* convert to days since 0001-01-01 */
today = date("l") /* get today in a sortable date */
 today_days = date("b") /* convert to days since 0001-01-01 */
days=today_days-due_days /* calc difference of days */
 due_date = date("L", due_date, "s") /* convert to language format */
if days<7
then return ("Die Differenz beträgt zwischen dem Tag der Abgabe:" due_date
"und heutigem Tage:" today days "Tage und wird daher noch toleriert.")
else if days=7
then return "Die Differenz beträgt zwischen dem Tag der Abgabe:" due_date
"und heutigem Tage:" today days "Tage und wird daher gerade noch toleriert."
else /* nur mehr der Fall möglich, dass "days>7" ist ! */
 return ("Die Differenz beträgt zwischen dem Tag der Abgabe:" due_date "und
heutigem Tage:" today days "Tage und wird daher nicht mehr toleriert.")
 ]]>
</lxslt:script>
</lxslt:component>
 <xsl:template match="deadline">
 <p> <xsl:value-of select="my-ext:calc(@due_date)"/> </p>
 </xsl:template>

and my xml-file has this:

<deadline due_date="June 30, 2002"></deadline>

but when i(cocoon) try to transform i get an emty page, it seems that the
rexx script did not get the argument from the deadline-node

if you would be so kind and have a short look at it

thankx

gerald


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message