[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Formatting date
Hi, > I want to format the next element: > > <creation_date>2/9/2001 9:23:13</creation_date> > > And transform to: > > <cr_date day="02" month="09" year="2001"/> > > Can I do this transformation using XSL. <xsl:template match="creation_date"> <cr_date day="{format-number(substring-before(., '/'), '00')}" month="{format-number(substring-before(substring-after(., '/'), '/'), '00')}" year="{substring-before(substring-after(substring-after(., '/'), '/'), ' ')}"/> </xsl:template> Cheers, Jarno 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
|