Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: How to write nested for loop to generate SVG rectangles?

From: "Siegfried Heintze" <siegfried@-------.--->
To: NULL
Date: 9/7/2008 11:10:00 AM

Yowza! That XST2 with the freebie SAXON works! Thanks! And yes, you were 
right: I intended to have 13 rectangles in my problem description.

> Described here:
>
> http://www.topxml.com/code/cod-422_10050_avoiding-an-xslt-processor-crash-due-to-deep-recursive-processing.aspx
>
OK, I'm reading this link now.
Shucks! This link is bad: 
http://www.topxml.com/snippetcentral/main.asp?view=viewsnippet&id=v20010126065631.
This seems to be bad too: 
http://sources.redhat.com/ml/xsl-list/2001-01/msg00308.html

So I need some recommendations. Since I only need a couple of dozen 
iterations, does that mean I don't have to worry about crashing MSXML3 
because that and other XSLTs require 2000 recursions to crash?

So my problem is a tad bit more complex that what I stated above and I'm 
thinking XSLT2 is the answer. Let me know if I can do it in XSLT1 because I 
would love have a larger choice of XSLTs than just SAXON.

All rectangles are 6.55 mm apart (vertically and horizontally, border to 
border or edge to edge) and have a height of 12.5mm. Most rectangles are 
12.5x12.5. So now in Saxon I can get row #1 with 13 rectangles. I have a 
total of six rows. Rectangle #14 in Row #1 is 20.7mm and Rectangle #15 is 
20.725mm.

In row #2  rectangle #14 is 28.925 mm wide. In row 3 rectangle rectangel #1 
is 20.7 mm wide and rectangle #14 is 20.725mm.
In row #3 Rectangle #1 is 20.7mm and rectangle #14 is 20.725mm.

OK, you get the idea. If you have not guessed already, I'm drawing a 
keyboard in SVG.

Well, I'm not too familiar with XSLT 2 and I'm presently looking for some 
tutorials. Can XSLT2 help me with these exceptions better than XSLT1?

Now, as you probably know, every key on a keyboard has a unique scan code. 
For now, I'll just assign the scan codes serially starting at 1 with the top 
left most key. Or better yet, a scan code (for now) could be the 
concatenation of the row # and the position of the key in that row.

So what do you recommend: XSLT2 with SAXON or XSLT1 for this task?
After I figure this out, I need to figure out how to make XSLT put the 
keycaps on inside of each rectangle for four different languages (I already 
have that working with hand coded SVG with CSS styles that turn off the 
keycaps for all but one language at a time). This is enough for one Sunday 
morning's post.

Thanks,
Siegfried

Thanks for all your help!




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent