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

Re: Problem2 date:format-date running EXSL

Subject: Re: Problem2 date:format-date running EXSL
From: Rajendra S Rawat <rajsrawat@xxxxxxxxx>
Date: Tue, 29 Jul 2003 00:36:54 -0700 (PDT)
xsl format date
Hi! Mukul

I'm facing similar problem with date:format-date.I
need to convert date in xml to some thing like 
"OCT 25, 03" 
I'm using XML Spy 5.

files are:
--------test.xml---------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<dates>
	<date>2003-10-25</date>
</dates>
-----------test.xsl------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<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.format-date.template.xsl" />
	<xsl:output method="xml" version="1.0"
encoding="UTF-8" indent="yes"/>
	<xsl:template match="dates">
		<xsl:variable name="result">
			<xsl:call-template name="date:format-date">
				<xsl:with-param name="date-time" select="date"/>
				<xsl:with-param name="format" select="'MMM DD,
yyyy'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:value-of select="$result"/>
	</xsl:template>
</xsl:stylesheet>
--------------------------------------------
I have following files in working directory:
>str.padding.template.xsl
>date.format-date.template.xsl
>test.xml
>test.xsl

NOTE:
str.padding.template.xsl
and date.format-date.template.xsl are downloaded from
http://exslt.org
-----------------------------------------------
but with no result!

can someb'dy help?

Thanks & Regards
Raj



------------------------
 Mukul Gandhi <mukulw3@xxxxxxxxx> wrote:
> i was able to run the EXSLT extension with Xalan..
> In
> EXSLT date.xsl file , lot of files are imported. i
> deleted all imports except 
> <import
> href="functions/difference/date.difference.xsl"/>
> 
> which i needed. this made the transorm run
> successfully.. the original date.xsl file probably
> caused deep recursion, which caused StackOverflow
> error..
> 
> Regards,
> Mukul
> 
> 
> --- Mukul Gandhi <mukulw3@xxxxxxxxx> wrote:
> > Hello ,
> > i am using xalan-j_2_5_D1.. i am trying to run the
> > EXSL date:difference function in a XSL
> stylesheet..
> > i
> > have downloaded the EXSL extensions from
> > www.exsl.org
> > and have placed them in proper path..
> > 
> > my xml file is
> > ---------------
> > <?xml version="1.0" encoding="UTF-8"?>
> > <dates>
> >   <date>2003-07-25</date>
> >   <date>2003-07-23</date>
> > </dates>
> > 
> > and the xsl is below
> > --------------------
> > <?xml version="1.0" encoding="UTF-8"?>
> > <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:output method="text" version="1.0"
> > encoding="UTF-8" indent="yes"/>
> >   <xsl:template match="dates">
> >    <xsl:variable name="diff">
> >      <xsl:call-template name="date:difference">
> >        <xsl:with-param name="start"
> > select="date[1]"/>
> >        <xsl:with-param name="end"
> select="date[2]"/>
> >      </xsl:call-template>
> >    </xsl:variable> 
> >    <xsl:value-of select="$diff"/> 
> >   </xsl:template>
> > </xsl:stylesheet>
> > 
> > when i apply the above XSL to XML , i get the
> error
> > "XSLT Error(java.lang.StackOverflowError)"
> > 
> > As suggested here
> > http://xml.apache.org/xalan-j/faq.html#faq-N102B9
> > 
> > i have tried by increasing the stack size to 1MB,
> > but
> > still i am getting this error.. 
> > 
> > is it possible to run the above XSL with Xalan
> > 2.5.1..
> > ?
> > 
> > Regards,
> > Mukul
> > 
> > 
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site
> > design software
> > http://sitebuilder.yahoo.com
> > 
> >  XSL-List info and archive: 
> > http://www.mulberrytech.com/xsl/xsl-list
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

 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.