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 August 31st, 2015, 06:47 PM
Registered User
 
Join Date: Aug 2015
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default combining and ordering timestamps

Hello,

I'm logging data from 3 wheels in an effort to compare their motion.
As each wheel turns a pulse is generated and the following is recorded:
timestamp in format HH:MM:SS:FFF (hours, minutes, seconds, milliseconds)
counter for this wheel (each pulse increments that wheel's counter)

The goal is to review the wheel data in a spreadsheet for comparison.
My idea was to format this data into xml and then use xslt to massage it into something that can be easily viewed and compared.
However the timestamps will probably always be slightly different between the wheels. Although if they do match exactly - that is another use case I haven't considered.

The simple format of the xml:
Code:
<Run_1>
<Wheel-ID>1</Wheel-ID><timestamp>5:37:9:224</timestamp><counter>1</counter>
<Wheel-ID>2</Wheel-ID><timestamp>5:37:9:770</timestamp><counter>1</counter>
<Wheel-ID>2</Wheel-ID><timestamp>5:37:9:889</timestamp><counter>2</counter>
<Wheel-ID>1</Wheel-ID><timestamp>5:37:11:114</timestamp><counter>2</counter>
</Run_1>
Code:
One visual representation might be something like this in excel or calc:
          Wheel 1 Cntr       Wheel 2 Cntr         Wheel 3 Cntr
t0            1         
t1                                1      
t2            2      
t3                                                       1    
t4                                2
The timestamps would have to be in order and as you can imagine, the result might not be that great because of the gaps. For each wheel-record there would not be an exact match in the timestamp with the other wheels.

Ideally the best comparison would be to superimpose charts of all three wheels to see how they progressed through time.
But I'm new to xslt and need to take baby steps.

So I'm looking for guidance on how I'd use xslt that would combine all the timestamps into an ordered list for the first column, but retain their relationship with their wheels in the other columns.

All the tutorials I've seen so far haven't helped. So even some pointing to reference material that might be applicable would be appreciated!

Thanks,
Skippy
 
Old September 1st, 2015, 04:16 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

I would have thought some kind of graphical representation would be much more effective. Generating SVG charts with XSLT is much easier than you think

But this forum is about XSLT coding, not about visualisation of data: decide what output you want, and we can help you produce it.

(Incidentally, if your question isn't specifically about something you found in a Wrox Press book, then these days there is much more activity on StackOverflow: XSLT questions there are usually answered very effectively).
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Display Timestamps from MS SQL 2000? thetwai C# 1 March 13th, 2007 07:43 AM
using multiple timestamps webgrphx PHP Databases 0 October 22nd, 2006 04:57 PM
Record timestamps JeffMM Classic ASP Databases 0 March 24th, 2004 03:14 AM
DATE\\Timestamps bph Access VBA 2 January 29th, 2004 03:02 PM
Help with GMT timestamps javahelpet JSP Basics 0 December 31st, 2003 02:54 PM





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