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 September 23rd, 2011, 06:03 AM
Registered User
 
Join Date: Aug 2011
Posts: 9
Thanks: 2
Thanked 0 Times in 0 Posts
Default Change Date

Hello, i have a problem with my xslt and i hope you can help me

i have an XML Tag "ausgabe" in this tag is some text and the dae from the hole week"

XML Code:
Code:
<ausgabe>Gültig vom 03.10. bis 08.10.2011</ausgabe>
Now i need the Date only from Wednessday, means i need a 05.10 exept of the 03.10

Is that possible?
That is my XSLT code until now:
Code:
		<xsl:element name="ausgabe">
			<xsl:value-of select="normalize-space(Root/ausgabe)"/>
			<!--<xsl:value-of select="substring(Root/ausgabe,11, 2)" />-->
		</xsl:element>
 
Old September 23rd, 2011, 06:34 AM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
Default

First tell us whether you use XSLT 2.0 or 1.0. XSLT 2.0 has support for xs:date and xs:dateTime values and operations on them although ideally even in that case your XML input data would say something like e.g.
Code:
<ausgabe>Gültig vom <date>2011-10-03</date> bis <date>2011-10-08</date></ausgabe>
so that any date values are properly marked up as elements of their own (so that XPath can select them) and in the right date format.
__________________
Martin Honnen
Microsoft MVP (XML, Data Platform Development) 2005/04 - 2013/03
My blog





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change a NVCHAr to a DATE rtr1900 ASP.NET 2.0 Basics 2 June 30th, 2009 12:53 AM
CHANGE DATE FORMAT Vision G Access VBA 2 April 8th, 2008 12:16 PM
how to change date format prasannagps Forum and Wrox.com Feedback 2 September 14th, 2005 01:28 PM
need to change date format desprate Access VBA 1 April 10th, 2005 12:45 PM
Change date format Patrick19 Classic ASP Basics 1 March 14th, 2005 06:23 PM





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