Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 14th, 2007, 12:04 PM
Authorized User
 
Join Date: Mar 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Elimante spaces from element value returned.

This is a tricky one.

The element value being returned by the XML is '14 Mar 2007'

I want this to be displayed as : 14Mar07

I am using this :

<xsl:value-of select="DateVAlue"/>
which returns '14 Mar 2007.

How can I display this by as 14Mar07.

Do I need to use substring thrice?



 
Old March 14th, 2007, 04:54 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

In XSLT 2.0 you can do this with regular expressions and replace(). In 1.0 the simplest is probably to use substring thrice as you suggest.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem adding element to the previous element dani1 XSLT 5 September 10th, 2008 01:38 AM
disappearing spaces gezi XSLT 0 March 26th, 2006 02:23 AM
Frame Spaces EvilGuyWhoEatsBrains HTML Code Clinic 2 January 5th, 2005 12:24 PM
adding of element and assigning to one element sushovandatta XSLT 2 November 16th, 2004 07:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.