xsl-list
[Top] [All Lists]

RE: Is this possible with XSL?

2006-03-03 09:57:54
It looks like some nested xsl:choose elements in combination with some mod() 
tests could do this, but it's hard to understand exactly what your question is. 
If you explained the rules for producing the output in a little more detail, it 
would be easier to help.
-- 
Charles Knell
cknell(_at_)onebox(_dot_)com - email



-----Original Message-----
From:     Cindy Hunt <Cindy(_dot_)Hunt(_at_)sas(_dot_)com>
Sent:     Fri, 3 Mar 2006 11:46:06 -0500
To:       <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject:  [xsl] Is this possible with XSL?

Hi-

I am having to do a bit of difficult programming work in my stylesheet that I 
am trying to figure out if I can actually code this with XSL or if I should try 
to call a Java extension to do this instead. We have an empty element called 
<columnRuler> that has two attributes to denote the starting number and ending 
number of this ruler. This ends up generating a monospace sequence of 
characters. We sometimes use this above monspace code samples to denote what 
column something occurs in.

Here is what is looks like if the element looked like <columnRuler startNum="1" 
endNum="40"/>:
----+----1----+----2----+----3----+----4

Here is what is looks like if the element looked like <columnRuler 
startNum="20" endNum="53"/>:
2----+----3----+----4----+----5---

So the single digits (1-4 and 6-9) are represented by dashes, the 5s are 
reprensented by plusses, and the 10s places are represented by their 1st digit 
(1 for 10, 2 for 20, etc.). I don't believe that we would support anything over 
100 since that would be hard to represent.

Does anyone know if this is possible to do with XSL?

Any suggestions appreciated,
Cindy Hunt



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>