[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: XML to SVG

Subject: RE: [xsl] XML to SVG
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Mon, 16 Dec 2002 13:44:14 -0500
xslt random
[ Kevin.Gutch@xxxxxxxxxxx]
> 
> Does anyone have any working examples of how to go from XML 
> to SVG? I am particularly interested in graphs. Is XSLT the 
> best way to go for this or is somethign like Batik more 
> suited for creating graphs, pie charts etc?
> 

XSLT can be good if the calculations you need to do fit with the
available XSLT capabilities.  I used XSLT -> SVG to create some scatter
plots based on user ratings (importance vs satisfaction on a scale like
"not important' .. "very important").  I converted the xml-formatted
ratings to numeric values (0..5), and plotted them including dithering
so that points with the same ratings would not fall on top of each
other.  I used different symbols for data from different sources.  There
were roughly one hundred points.

This took several passes, which can be orchestrated using a batch file
or shell script.  The results were very good.

How did I do random dithering without an XSLT random number generator?
I produced (pseudo) random numerical strings for the x and y coordinates
using python and put them into a template.  I indexed into the strings
using position() as the index, in effect returning a random integer
between 0 and 9.  I added the return value to the base coordinates to
dither the position of the points.  Fast and easy.

Cheers,

Tom P

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.