Good morning Holger,
thanks for your reply.
Let me say it straight from the start, I'm an absolute
beginner and have no previous experience with XML and
web applications.
I work in the project to visualize aggregated data
coming from different sources and I'm having really
hard times because of not being able to choose an
appropriate tool for a specific task.
As for now I managed to embed an SVG graph into web
page using XSLT so I thought I'd hold-on with XSLT as
long as possible, in order not to get burried under
the pile of things that I don't really understand,
such as XBL and so forth.
At the same time it's become clear to me that for
certain tasks I must use javascript.
For instance I'd convert SampleTime into number of
seconds, the first instance would be zero. I'd also
scale all following SampleTimes in such a way that the
last one would lend at 700 pixels(this is the width of
my future graph), assuring meanwhile that all samples
have been spread proportionally to the time scale
along width of the graph.
All this overhead is meant only to determine an X
coordinate in <svg:polyline>'s points, an Y coordinate
will be the Value field.
For now I have the following pice of code in my
template:
<xsl:element name="svg:polyline">
<xsl:attribute name="points">
<xsl:for-each
select="document(/procedure/data_sources/source/@filename)//ValueList/elt">
<xsl:value-of
select="20*(position())"/>
<xsl:text>,</xsl:text>
<xsl:value-of
select="(Value/text())*(-15)+200"/>
<xsl:text> </xsl:text>
</xsl:for-each>
</xsl:attribute>
<xsl:attribute
name="style">fill:white;stroke-linejoin: round;
stroke:red;stroke-width:2</xsl:attribute>
</xsl:element>
And line:
<xsl:value-of select="20*(position())"/>
will have to be replaced with something like
<xsl:call-my-script-to-insert-number-between-0-and-700/>
I hope that all I've explained here will help you to
choose a good example for me.
And I want to thank you in advance from the bottom of
my heart for helping people in need, like all of us
sometimes can find ourselves.
Have a good day Holger,
Greetings from Eindhoven
Taras
--- Holger Will <[EMAIL PROTECTED]> wrote:
> Hi Taras
>
> doing this in xslt might not be easy. especialy if
> you have data from
> different days.
> you want to turn the date to number of seconds since
> ... (?)
> i think its quite easy to just determin the seconds
> from midnight.
> if you use mozillas native SVG ,another option would
> be to use
> xbl(insead of xslt).
> if you do so you can use js to convert a date to
> seconds.that might be
> much easier.
>
> hope that helps
> Holger
>
> p.s.: will try to post an example later
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/1U_rlB/TM
--------------------------------------------------------------------~->
-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my membership"
----
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/