B.0 Bind Language API Reference

The bind language is based on a small set of orthogonal concepts. The goal is to create a simple means of marking up XML with constructs to generate structured content, lay out content, and update content. The bindings are intended to do their work both on a functional transform basis and on an incremental basis. Incremental updates are present to allow the efficient updating of a real-time display, and to facilitate incorporation into editing environments.

The three primary forms/phases are:

  • Templates

  • Layout

  • Values

During the template phase the XML tree is recursively examined for template constructs, which generate and prune content according to instructions. When all template activity has completed, the layout phase adjusts that content according to layout instructions. Then on an ongoing basis, specific values/attributes within the XML tree are updated. If conditions dictate that a structural change occurs (via template activity), then the template and layout phases are repeated.

Using the bind language, you can generate and alter just about anything in an SVG drawing. Everything in SVG is text, so everything is fair game. You can adjust the size of objects, alter their colors, hide and show graphics, change scales and transforms, and anything else that comes to mind. Before we get into the details of the bind language let’s outline a series of common scenarios and their solutions. Some of the commands won’t make sense until you understand the overall language, but the next sections should give you a more solid idea of what can be built, and how to go about doing it.