[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: time from server to document

Subject: Re: time from server to document
From: "cutlass" <cutlass@xxxxxxxxxxx>
Date: Wed, 27 Mar 2002 08:48:09 -0000
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.