Wrox Programmer Forums
|
All Other Wrox Books Do you have a question about a Wrox book that isn't listed anywhere on p2p.wrox.com or where the forum is locked? Here's a forum to post questions about any other Wrox book so that other readers or one of the authors can help you with your questions. IF YOU ARE LOOKING FOR CODE DO NOT ASK "Where can I find the code for this book?" That question is answered here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the All Other Wrox Books 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
  #1 (permalink)  
Old March 25th, 2004, 03:31 PM
Registered User
 
Join Date: Mar 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default XSLT String Tokenizing

I need some help parsing out and manipulating some information.
I have an element that looks like:

<time>2004 Mar. 21 8:00 AM</time>

I need to break this apart into many elements that are correctly formatted as well..

what I need should look something like this.

<time>
   <hour>8</hour>
   <minute>0</minute>
   <day>21</day>
   <month>3</month>
   <year>2004</year>
</time>

I can handle the formatting - meaning - I can change the hour to 24 hour time and change the Months to Integers, my problem is separating out those pieces. Does anyone have any kind of code that might iterate though the string based on the 'space' being a separating character? Any help on this would be greatly appreciated.

EB
  #2 (permalink)  
Old March 25th, 2004, 06:48 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Excuse me, what does this have to do with Wrox books?

If it is part of a book, you need to specify which one and which page.

If it has nothing to do with a book, you should post in the XSLT forum.

Thank you.

----------
---Snib---
----------

<><
  #3 (permalink)  
Old March 26th, 2004, 05:05 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Maybe you could also tell us what environment and programming language you are using.





Similar Threads
Thread Thread Starter Forum Replies Last Post
string to binary conversion in XSLT navi25584 XSLT 5 September 3rd, 2008 03:14 AM
Parse XML string parameter from XSLT maulik33 XSLT 6 December 5th, 2007 11:51 AM
String in XSLT sani723 XSLT 4 March 8th, 2007 09:51 AM
Can XSLT read DTD/schema and Generate XSLT.. ROCXY XSLT 1 November 6th, 2006 09:39 AM
dynamic xslt -> xslt creation namespace problem jkmyoung XSLT 2 July 15th, 2006 12:42 AM





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