Home > Store

SVG Unleashed

Register your product to gain access to bonus material or receive a coupon.

SVG Unleashed

Premium Website

  • Sorry, this book is no longer in print.
Not for Sale


  • Copyright 2003
  • Edition: 1st
  • Premium Website
  • ISBN-10: 0-672-32429-6
  • ISBN-13: 978-0-672-32429-1

Targeted to the experienced Web programmer, SVG Unleashed equips the reader with the practical knowledge to create and manipulate Scalable Vector Graphics (SVG) programmatically, both on the client and the server side. Part I of the book provides a thorough reference of SVG syntax, elements, coordinate systems and animations, with coverage of the XML Document Object Model (DOM) and the SVG DOM application to programming with particular emphasis on the use of ECMAScript/JavaScript. In Part II, readers learn to use several server-side languages to create SVG documents. Part IV demonstrates SVG programming through several case studies.



All the code in the book in one convenient zip file - 7.9 MB -- code.zip

Supplemental contents for the book is available here in Adobe Portable Document Format (PDF) format. You will need Adobe's Acrobat Reader to view these files. If you do not have the Acrobat Reader installed, you may go to Adobe Systems' web site to download this free reader.

Click on the links below to display the PDF file in a new window. Right-click on the link and select Save As if you want to download it to your hard drive.

Appendix B: SVG Elements Reference -- 212 kb - Appendix_B.pdf

Appendix C: SVG Attributes and Properties Reference -- 200 - Appendix_C.pdf

Appendix D: SVG Document Object Model (DOM) -- 128 - Appendix_D.pdf

Sample Content

Online Sample Chapters

Basic SVG Elements and Shapes

Basic SVG Elements and Shapes

Table of Contents



1. SVG Overview.

Understanding SVG. Advantages of SVG. Limitations of SVG. Basic Tools. SVG Painter's Model. Some SVG Examples. Introducing the XML DOM. Introducing the SVG DOM.

2. Document Structure in SVG.

SVG Is XML. The svg Element. The g Element. The title and defs Elements. The symbol Element. The use Element. The script Element. Zoom and Pan. Linking in SVG. SVG DOM Interfaces. Miscellaneous SVG DOM Objects.

3. Basic SVG Elements and Shapes.

The line Element. The rect Element. The circle Element. The ellipse Element. The polyline Element. The polygon Element. Color in SVG. Gradients in SVG. SVG Patterns. SVG DOM Interfaces for the SVG Basic Shapes. Other SVG DOM Interfaces.

4. Using CSS with SVG.

What Is Styling in SVG? Specifying a Style. Individual Presentation Attributes. The SVG style Attribute. Internal CSS Style Sheets. External CSS Style Sheets. Using Entities When Styling. Style SVG DOM Interface. Examples of Styling Using the DOMs.

5. Coordinate Systems in SVG.

The SVG Canvas. Preserving Aspect Ratio. Transformations and Coordinates. Other Elements That Affect Coordinates. SVG DOM Interfaces. Manipulating Coordinates Using the DOM.

6. Paths in SVG.

Using the path Element. Creating Curves Using the path Element. Applying Text to a Path. The SVG DOM Interfaces. Manipulating Paths Using the DOM.

7. Transformations in SVG.

Introduction to Transformations. Translation Transformations. Rotation Transformations. Scale Transformations. Skew Transformations. Transformation SVG DOM Interfaces. Scripting Transformation Examples.

8. Laying Out Text in SVG.

Overview of Text in SVG. The SVG Text Layout Elements. Text Layout Tasks in SVG. The textPath Element. The switch Element. Comparison of Text Layout in SVG and HTML. Text-Related SVG DOM Interfaces. Other SVG DOM Text and Font Objects. Examples of Accessing and Manipulating the DOM.

9. Clipping, Masking, Compositing.

A Terminology Review. Clipping in SVG. Masking. Compositing. The SVG DOM Interfaces.

10. SVG Filters.

SVG Filters. The filter Element. The SVG Filter Primitives. The SVG DOM Filter Interfaces. The SVG DOM Objects for Filter Primitives.

11. SVG Animation Elements.

SVG Animation in Context. The set Element. The animate Element. The animateColor Element. The animateMotion Element. The animateTransform Element. Animation Element-Related SVG DOM Interfaces. Miscellaneous Animation-Related Objects.

12. SVG for Web Authoring.

Using SVG with HTML/XHTML. Laying Out Web Pages in SVG. Using the foreignObject Element.

13. Accessibility, Internationalization, and Metadata.

Improving Code. General Accessibility Features of SVG. Internationalization. Metadata.


14. The SVG DOM.

DOM Background. DOM Level 2. DOM2 CSS. DOM 2 Events. SVG DOM-Specific Interfaces.

15. Scripting SVG.

Introduction to Scripting SVG. Specifying the Scripting Language. Manipulating the DOM. Changing style Attributes. Changing the Tree. SVG Events.

16. Animating SVG with Scripting.

HTML and SVG Interaction. Animating with ECMAScript.

17. Using SVG in Java Applications.

Applications in Java. Apache Batik. Displaying SVG in a Java Application. Generating SVG with a Java Application.


18. Server-Side Basics.

MIME Types. SVG with the Most Important Scripting Languages.

19. JSP, Servlets, and SVG.

JSP for Scripting. Java SVG DOM. A Simple Example. SVG DOM Specifics.

20. SVG and XSLT.

XSLT Overview. Three Steps to SVG. Server-Side Transformations.

21. SVG and Perl.

Generating SVG with Perl. Viewing the Quote of the Day. Generalizing Our Sample File. Generating SVG Using print Statements. Generating SVG Using the W3C DOM API. Generating SVG Using the SVG.pm Module.

22. SVG and PHP: Building an Online Survey.

Database Structure. Survey Administration Tool. Online Survey Tool. Survey Statistics.

23. SVG .NET: Creating an Online Poll.

Database Structure. Survey Administration Tool. The Poll.


24. Case Study: SVG for Blueprints.

Some Blueprint Basics. From CAD to SVG. Uploading to the Server.

25. Case Study: SVG Web Map for Population Demographics.

Some Map Basics. Obtaining Map Data. Web Map Project Overview. Massachusetts Key Map: Level One. Plymouth County Map: Level Two. Server-Side Processing.

26. Case Study: FMS—Monitor and Control.

Project Overview. Elevation Photo. Plan View and Temperature Zones. Remote Monitoring. Remote Control. Summary.


27. SVG 1.1, 1.2, and 2.0.

Mobile SVG. Beyond SVG 1.1. SVG and Multiple Namespaces.


Appendix A. Glossary.
Appendix B. SVG Elements Reference.
Appendix C. SVG Attributes and Properties Reference.
Appendix D. SVG Document Object Model (DOM).


Submit Errata

More Information

Unlimited one-month access with your purchase
Free Safari Membership