[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: time from server to document
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|