Subject: Re: [xsl] time from server to document From: "cutlass" <cutlass@xxxxxxxxxxx> Date: Wed, 27 Mar 2002 08:48:09 -0000 |
excellant, not enough people post back their solutions after picking brains..... ----- Original Message ----- From: "Jarkko Moilanen" <Jarkko.Moilanen@xxxxxx> > Hi! > > Our solution to time and date prob is: > (Xalan C and linux) > > 1. Use parameters in Xalan > > #!/bin/sh > # This script is done for bash unix shell, but can be translated > # easily for other skripting languages too > # > # > #Path to Xalan executable > XALAN="/usr/local/xml-xalan/c/bin/Xalan" > # > # > # Used file > # > FILE=$QUERY_STRING > # > # > #All used paths > XMLFILE="/var/www/xslt/$FILE.xml" > XSLFILE="/var/www/xslt/$FILE.xsl" > OUTFILE="/var/www/xslt/xmlout/$FILE.xml" > # > # > #Parameters to Xalan > # > # > DATE="`date +"%d/%m/%Y %T"`" #Day and time > TEST="hipsu!" > #Another param > # > > # > # Do the processing > # > $XALAN -p date1 "'$DATE'" -p hipsu "'$TEST'" -o $OUTFILE $XMLFILE $XSLFILE > # > # > # Lets print it all out > # > echo "Content-type: text/xml" > echo "" > cat $OUTFILE > # > #EOF > > > > 2. In the xsl file: > > <xsl:output method="xml" indent="yes" standalone="no" /> > > HERE WE DECLARE THE PARAMETER. PARAM NEEDS TO BE OUTSIDE TEMPLATE MATCH. > > <xsl:param name="date1" select="'$date1'"/> > DONT KNOW IS IT NECESSARY TO SELECT IT HERE???!!! no u could just do <xsl:param name="date1"/> though i have experienced in some earlier XSLT processors some different behavior. cheers, jim fuller XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] time from server to docum, Jarkko Moilanen | Thread | Re: [xsl] time from server to docum, J.Pietschmann |
Re: [xsl] Xinclude prob, Jarkko Moilanen | Date | RE: [xsl] ??: [xsl] how to change x, Jarno . Elovirta |
Month |