Showing posts with label XML. Show all posts
Showing posts with label XML. Show all posts

January 23, 2008

Apache Batik SVG Toolkit Overview

Apache Batik is a Java-based toolkit for applications or applets that want to use images in the Scalable Vector Graphics (SVG) format for various purposes, such as display, generation or manipulation.

The project’s ambition is to give developers a set of modules that can be used together or individually to support specific SVG solutions.

The Batik modules are of one of three types: application modules, core modules and low level modules.

Application modules illustrate how to use the core modules and let users evaluate the Batik software by experimenting with its features. So, the application modules illustrate the functionality that Batik offers. The Batik SVG Toolkit distribution contains a few demos:

  • Squiggle SVG Browser
    The Squiggle SVG Browser lets you view SVG file, zoom, pan and rotate in the content and select text items in the image and much more.

  • SVG Font Converter
    The SVG Font Converter lets developers convert character ranges from the True Type Font format to the SVG Font format to embed in SVG documents. This allows SVG document to be fully self-contained and have their rendered identically on all systems.

  • SVG Rasterizer
    The SVG Rasterizer is a utility that can convert SVG files to a raster format. The tool can convert individual files or sets of files, making it easy to convert entire directories of SVG files. The supported formats are JPEG, PNG, and TIFF, however the design allows new formats to be added easily. In addition (and despite the name) the rasterizer tool can also convert SVG files into PDF.

  • SVG Pretty Printer
    The SVG Pretty Printer lets developers “pretty-up” their SVG files and get their tabulations and other cosmetic parameters in order. It can also be used to modify the DOCTYPE declaration on SVG files.

Core modules are the heart of Batik and the primary deliverables for the projects. These are the modules developers use to manipulate, generate, create, convert, render and view SVG content. They can be used individually or in combination for various purposes, and the application modules offer some usage examples:

  • The SVG generator is a module containing SVGGraphics2D class, that lets all Java applications or applets easily convert their graphics to the SVG format, as easily as they draw to a screen or a printer, by leveraging the Java 2D API’s extensible design.

  • The Swing components module includes, primarily, the JSVGCanvas class, a UI component that can display SVG content and let the user interact with that content (zoom, pan, rotate, select text, etc.).

  • The Bridge module is rarely used directly. It is responsible for creating and maintaining an appropriate object corresponding to an SVG element. The bridge converts an SVG document into the internal representation Batik uses for graphics (GVT, the Graphic Vector Toolkit).

  • The Transcoder is a module that provides a generic API for transcoding an input to an output. This module transcodes an input stream or a document into a particular ouput format, used for converting SVG documents to other types.


Low-level modules are used internally by the core modules to accomplish their work.
These modules are not expected to be used directly by developers using the Batik API. Rather, they support the operation of the core modules. The low level modules include:

  • The Graphic Vector Toolkit (GVT) module, which represents a view of the DOM tree that is more suitable for for rendering and event handling purposes. This module describes DOM tree in terms of a tree of Java graphics objects.

  • The Renderer module is responsible for rendering a GVT tree and any related task. For example, a raster based renderer may perform some caching (the default renderer in Batik does that). However, a renderer could perform any task deemed necessary and does not have to be raster based.

  • The SVG parser module contains parser classes for complex SVG attributes such as the transform or color attributes. Higher level modules rely on the SVG parser module.

Here are small list of projects and products that using Batik SVG Toolkit:

  • The Apache Cocoon project uses Batik to rasterize SVG images.
  • The Apache FOP project uses Batik to handle SVG images. It uses the SVG rasterizer and extends the Batik transcoder architecture to offer SVG to PDF conversion.
  • ElixirTech’s ElixirReport uses Batik for charting and for its SVG component.
  • GLIPS Graffiti is an Open Source Extensible Full Feature Native SVG Editor.
  • eDoc Studio, a page layout package, uses the Batik SVG generator to export pages to SVG.
  • ILOG Discovery Preview, a free visual data analysis tool letting you visualize and edit data sets in a very wide variety of views (2D graphs and charts, various kinds of treemaps, parallel coordinates, parallel histograms and much more), uses the Batik SVG export module.
  • The JFreeChart Project uses Batik to export charts in the SVG format.
  • Lagoon, an XML-based framework for web site maintenance, uses the Batik SVG Rasterizer to render SVG as bitmap graphics for web publishing.
  • ILOG JViews Component Suite, a product for advanced visualization, uses and extends the Batik SVG export module.
  • Lords Map is a program to allow players and visitors to view the current map of various campaigns. Lords Map uses Batik’s SVG DOM and SVG Generator.
  • Luxor XUL is a free, open-source XML User Interface Language (XUL) toolkit in Java released under the GNU GPL that supports hand-picked Mozilla XUL goodies and also includes a ultra-lightweight, multi-threaded web server, a portal engine, a scripting engine, a template engine and much more. Gerard Bauer, the Luxor project lead, has written an extensive SVG presentation.
  • OptimalJ, a UML Class Diagram Editor for NetBeans, uses Batik to export SVG.
  • Sketsa is a vector drawing application based on Batik. With Sketsa, you can create vector graphics that can be scaled and printed at any resolution, without losing detail or clarity.
  • Oracle Corp.’s JDeveloper10i uses Batik to export class diagrams in SVG. It uses the SVG export module.
  • Svolgo, a Graph Visualisation/Transformation Framework for the Semantic Web Cross-model transformation, node and arc diagrams, representation in SVG. This project uses Batik’s SVG DOM implementation.
  • Volity is an open platform for Internet-based multiplayer casual gaming. Its official client, Gamut, uses Batik, allowing developers to create game UI files that use ECMAScript-driven SVG.
  • XWeb, a tool to create websites automatically out of XML input. Uses the Batik SVG Rasterizer.
  • XML_svg2image is a PHP class which translates SVG files to PNG or JPEG using Batik.

If you are interested in Apache Batik SVG Toolkit, you can download it from Apache XML Graphics Project

January 21, 2008

Renesis SVG Player Key Features

Renesis SVG Player

Renesis Player is a complete SVG 1.2 compatible renderer and viewer.
It was developed by
examotion® GmbH with the purpose of beeing the most complete and yet most perfomant implementation of the Scalable Vector Graphics Standard.
It is available for a lot of different operating systems and devices including Windows, Windows CE, Linux, MacOS and others.

Renesis Player Key Features


  • Optimized Parsing and Rendering
  • Very small memory usage
  • Efficient scripting, allowing interaction with HTML
  • High quality printing and exporting
  • High quality rendering
  • Extendable through COM, JS, and other technologies
  • Various plattforms and technologies:
    • Windows 98, ME, 2000, XP, 2003, Vista
    • Windows CE
    • Linux (Suse, Redhat, Debian, etc.)
    • ActiveX Control
    • .NET Assembly
    • Browser Plugin (Firefox, Internet Explorer, Opera, Safari and more)
    • Sun OS
    • Symbian
  • Extended SVG 1.2 Features:

    • Text Wrapping Modes
    • Pages Support
    • Event Handlers
    • EcmaScript for XML (E4X)
    • Multiple Text Editing

    Scalable Vector Graphics

    Scalable Vector Graphics or short spoken SVG is a standardized format for describing interactivate, animated vector graphics for the web and desktop. It is usable for many different things like data exchange, intranet applications, websites and much more. It was promoted by the W3C Consortium back in 2001 as Version 1.0 and since that continuously evolved further until version 1.2 which is the current one. One of the main facts of SVG is that it is purely based on XML which allows the easy generation of SVG content.

    Renesis Player Support

    Renesis player has a professional support, provided by RENESIS Alliance .
    The RENESIS Alliance is a special area aimed towards professional users of the Renesis Technology, Distributors of the Player, OEM Partners and Enterprises using the technology.

    The RENESIS Alliance offers different options. The members can subscribe to, depending on their financial and technical needs including but not limited to developing specific extensions to the RENESIS Technology, helping in using RENESIS within the member's Environment or Product and offering professional support within a guaranteed time.

    Renesis SVG Player Launches Version 0.7

    From press release:
    "
    A new Release v0.7 of the Standalone and IE-Pluginable Renesis® SVG Player is out. What's special on this version is the all-in-new Font and Text Engine which supports things like Unicode, Embedded Fonts, Text Selection, Copy to Clipboard, Text-Anchoring, Font-Stretching, Text-Decorations and much much more. The perfomance of the text engine should have improved as well. Other news are many many bugfixes and improvements based on our bugtracker as well as fixing one huge issue that caused a lot of crashes on various platforms. The next release is planned for somewhere between Juli and August 2007 and will mainly be a maintenance Release that will get a completely rewritten DOM Structure (not the EcmaScript binding!). Why should you care? As of now, inserting a lot of elements (especially text nodes) causes a lot of memory overhead and speed loss. The new structure system should shorten down the used memory to as low as 30-40% for dynamic changes as well as speed up the dynamic changes by a factor of 4-10x at a minimum so stay tuned! As always, comments, thoughts and questions are always very welcome into our forum. "


    You can download the most performant, memory-efficient SVG Player here.


    January 16, 2008

    An Introduction to Streaming Transformations for XML

    There is an interesting acticle by Oliver Becker, Paul Brown and Petr Cimprich about
    Streaming Transformations for XML.

    ...XML transformation language that operates on streams of SAX events. STX resembles XSLT 1.0, the tree-driven transformation language for XML, but STX offers unique features and advantages for some applications.

    XSLT's popularity has grown over the past three years, both aiding and riding on the adoption of XML. In comparison to API-level programming with Document Object Model (DOM), XSLT provides a loosely-typed, declarative environment tailored for tree-oriented transformation of XML documents, which has achieved wide adoption as a general-purpose XML manipulation tool despite the proscription:

    ...XSLT is not intended as a completely general-purpose XML transformation language. Rather it is designed primarily for the kinds of transformations that are needed when XSLT is used as part of XSL. — XSLT 1.0
    DOM versus SAX
    "Which is better, DOM or SAX?" is a common question for newcomers on XML-related discussion lists. (And, one could legimately also ask "DOM or JDOM or DOM4J or XOM?" and "SAX or XNI"?)

    DOM provides an overall view of an XML document through tree traversal and manipulation. DOM is heavyweight, however, in that it typically imposes a memory footprint of around five times the size of the underlying XML text for simple documents. DOM also imposes a significant time overhead for creating the necessary objects.

    SAX provides a sequential view of an XML document through a stream of events. SAX-based programs typically maintain some amount of state information that encapsulates already-received events, but SAX processing requires a negligible amount of memory (typically only the representation of the current event and the buffer for the parser).

    SAX is the event-oriented sibling of the DOM API. (See the sidebar for a short discussion of DOM versus SAX.) STX provides a streaming analog for XSLT by adopting some of the now familiar concepts from XSLT (e.g., matching based on templates and an XPath 1.0-like expression language) but using SAX as the underlying interface to the XML document. In line with the proscription about XSLT, STX is neither a general purpose XML transformation language, nor is it an attempt to improve, extend, or replace XSLT.

    Like SAX, STX is a completely free, grassroots effort by the XML community, initiated by Petr Cimprich; the specification and a mailing list are hosted on SourceForge. The current version of the STX specification contains a list of other contributors. There are currently two STX processor implementations:

    • Joost, a Java-based processor by Oliver Becker
    • STX::XML, a Perl-based processor by Petr Cimprich.

    [Read full article from XML.com]