Re: XSL and script code - please help

2003-03-24 Thread hgadm
Thanks Christopher, Adam, Thorsten and Joerg for your
valuable suggestions. I will try to implement a while
loop in XSL with a recursive xsl:call-template ...
construct and will report back to the group soon !

Cheers Holger

___
The ALL NEW CS2000 from CompuServe
 Better!  Faster! More Powerful!
 250 FREE hours! Sign-on Now!
 http://www.compuserve.com/trycsrv/cs2000/webmail/





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: XSL and script code - please help

2003-03-22 Thread Scherler
http://www.w3schools.com/
they have all elements and functions on a page!
[EMAIL PROTECTED] wrote:

Hi,

I recommend:

http://www.zvon.org/
(very short, very useful and informative tutorials on XSLT)
http://www.w3.org/TR/xpath#corelib - list of functions.
http://www.mulberrytech.com/xsl/xsl-list/
hope it  helps, cheers, A.

 

-is there a fract() function ? I know that a floor
function exists. 

- But what about the loop ?

- What about passing variables to this code (and
getting them back into the XSL script) ?
- Do I need further (script-)extensions to XSL to do
this ?
   

 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: XSL and script code - please help

2003-03-22 Thread Joerg Heinicke
Hello Holger,

there is an extension library for XSLT written by Dimitre Novatchev. You 
can find it at http://fxsl.sourceforge.net/. It contains for example 
trigonometric functions.
And if you really need XSLT for such an extreme logic, you can ask him - 
I'm sure he can help you with implementing the algorithm. But consider 
that XSLT was created for transforming XML trees into trees, not for 
calculating complex algorithms.

Regards,

Joerg

[EMAIL PROTECTED] wrote:
Hi all,
 
I am currently developing a histogram (svg) to be
included in the Cocoon portal.
The current solution for generation of the SVG code is
XSL only. 

Now I would like to add an algorithm for
y-axis autoscaling (see 'pseudocode' below). I am not
sure how to do this in pure XSL e.g. 

-is there a fract() function ? I know that a floor
function exists. 

- But what about the loop ?

- What about passing variables to this code (and
getting them back into the XSL script) ?
- Do I need further (script-)extensions to XSL to do
this ?
Best regards,

Holger

***

iReg=1;

regA=10**floor((max-min)/#-of-tics);

top loop

iReg++;

reg9=regA*floor(min/regA);

reg8=reg9+#-of-tics*regA;

if(maxreg8){		(would exit the loop if =)

if(fract(iReg/4)==0)

{regA=1.25*regA;}

else

{regA=2*regA;}

{

bottom loop


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


XSL and script code - please help

2003-03-21 Thread hgadm
Hi all,
 
I am currently developing a histogram (svg) to be
included in the Cocoon portal.
The current solution for generation of the SVG code is
XSL only. 

Now I would like to add an algorithm for
y-axis autoscaling (see 'pseudocode' below). I am not
sure how to do this in pure XSL e.g. 

-is there a fract() function ? I know that a floor
function exists. 

- But what about the loop ?

- What about passing variables to this code (and
getting them back into the XSL script) ?

- Do I need further (script-)extensions to XSL to do
this ?

Best regards,

Holger

***

iReg=1;

regA=10**floor((max-min)/#-of-tics);

top loop

iReg++;

reg9=regA*floor(min/regA);

reg8=reg9+#-of-tics*regA;

if(maxreg8){   (would exit the loop if =)

if(fract(iReg/4)==0)

{regA=1.25*regA;}

else

{regA=2*regA;}

{

bottom loop

*

___
The ALL NEW CS2000 from CompuServe
 Better!  Faster! More Powerful!
 250 FREE hours! Sign-on Now!
 http://www.compuserve.com/trycsrv/cs2000/webmail/





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: XSL and script code - please help

2003-03-21 Thread Delis, Christopher E.
for loops and the use of variables (like in imperative languages like
C/Java) are implemented differently in xslt.  recursion is often used.  i
recommend doing a search on functional programming and xslt in google.
there are probably many examples of how to write functions similar to
yours in xslt..

-Original Message-
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: 3/21/03 6:55 AM
Subject: XSL and script code - please help

Hi all,
 
I am currently developing a histogram (svg) to be
included in the Cocoon portal.
The current solution for generation of the SVG code is
XSL only. 

Now I would like to add an algorithm for
y-axis autoscaling (see 'pseudocode' below). I am not
sure how to do this in pure XSL e.g. 

-is there a fract() function ? I know that a floor
function exists. 

- But what about the loop ?

- What about passing variables to this code (and
getting them back into the XSL script) ?

- Do I need further (script-)extensions to XSL to do
this ?

Best regards,

Holger

***

iReg=1;

regA=10**floor((max-min)/#-of-tics);

top loop

iReg++;

reg9=regA*floor(min/regA);

reg8=reg9+#-of-tics*regA;

if(maxreg8){   (would exit the loop if =)

if(fract(iReg/4)==0)

{regA=1.25*regA;}

else

{regA=2*regA;}

{

bottom loop

*

___
The ALL NEW CS2000 from CompuServe
 Better!  Faster! More Powerful!
 250 FREE hours! Sign-on Now!
 http://www.compuserve.com/trycsrv/cs2000/webmail/





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: XSL and script code - please help

2003-03-21 Thread adam . kaczmarz
Hi,

I recommend:

http://www.zvon.org/
(very short, very useful and informative tutorials on XSLT)
http://www.w3.org/TR/xpath#corelib - list of functions.
http://www.mulberrytech.com/xsl/xsl-list/

hope it  helps, cheers, A.

 -is there a fract() function ? I know that a floor
 function exists. 
 
 - But what about the loop ?
 
 - What about passing variables to this code (and
 getting them back into the XSL script) ?
 
 - Do I need further (script-)extensions to XSL to do
 this ?

-- 
+++ GMX - Mail, Messaging  more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]