Generating Scalable Vector Graphics

The procedure for defining a stylesheet that generates an XML document that containts Scalable Vector Graphics (SVG) is the same as for any other stylesheet. Simply create a stylesheet that specifically creates SVG elements. You can then use Stylus Studio to display the rendered SVG.

Note

 

SVG is a W3C recommendation for an XML vocabulary that describes two-dimensional graphics. It is assumed that you are familiar with SVG. For additional information about SVG, see http://www.w3.org/Graphics/SVG .

About SVG Viewers

If you have an installed SVG viewer, Stylus Studio automatically displays the rendered SVG when you apply the stylesheet.

If you do not have an installed SVG viewer, you can still define a styelesheet that generates SVG. However, when you try to preview the result of the stylesheet, Stylus Studio displays the generated XML. You can download an SVG viewer from Adobe Systems Incorporated at http://www.adobe.com/support/downloads/main.html . Under Readers, select the SVG Viewer for Windows. After you install an SVG viewer, you must restart Stylus Studio and Internet Explorer to be able to view the rendered graphics.

Running the SVG Example

To run the SVG example that is included in Stylus Studio:
1. In Stylus Studio, open the examples\SVG\chart.xsl file in your Stylus Studio installation directory.

Alternative: If the Stylus Studio examples project is open, you can access this file from the Project window. To open the examples project, open examples.prj in the Stylus Studio examples directory.

The SalesFigures scenario has already been defined. In this scenario, the stylesheet operates on elements in the chart.xml source document. This file is also in the examples project, and in the examples\SVG directory.

2. Click Preview XSLT Result . Stylus Studio automatically uses your installed SVG viewer to render the resulting XML and display the SVG.

If you do not have an SVG viewer installed, Stylus Studio displays the resulting XML.

 
Free Stylus Studio XML Training: