SVG documents

SVG is a platform for two-dimensional graphics. It has two parts: an XML-based file format and a programming API for graphical applications. Just to enumerate some of the key features: shapes, text and embedded raster graphics with many painting styles, scripting through languages such as ECMAScript and support for animation.

SVG is a vendor-neutral open standard that has important industry support. Companies like Adobe, Apple, IBM and others have contributed to the W3C specification. Many documentation frameworks, including DocBook have support for SVG by means of defining the graphics directly in the document.

 

Figure 4.106. SVG Content Completion

SVG Content Completion

<oXygen/> XML Editor adds SVG support by using the Batik package, an open source project developed by the Apache Software foundation. The SVG DTD is solved by <oXygen/>'s default XML catalog.

[Tip]Tip

To render SVG images which use Java scripting you have to copy the "js.jar" library from the Batik distribution to the <oXygen/> "lib" directory and restart the application.

There are many navigation shortcuts which can be used for navigation in the SVG Viewer like:

  • The arrow keys or Shift and Click move the image

  • Ctrl + Right Click rotates the image

  • Ctrl + I and Ctrl + O or Ctrl and Click to Zoom in or out

  • Ctrl + T to reset the transform

<oXygen/> can render SVG by two means:

 The Standalone SVG Viewer.

You may use the action Tools SVG Viewer ... to browse and open any SVG file having the extension .svg or .svgz. If the file is included in the current project then you can open it by right-clicking on it and selecting Open withSVG Viewer

 

Figure 4.107. SVG Viewer

SVG Viewer