XML Quickstart

Tagneto can be used to transform XML into other XML (including HTML). It is probably not as efficient or robust as XSLT, but hopefully more intuitive to use.

Prerequisites:
  1. Download and and install Tagneto.
  2. Define a tagneticconfig configuration file.
There are two approaches to transforming XML:

1. DefineInclude

Use org.tagnetic.core.tags.define.DefineInclude as a tag handler for the XML tags. DefineInclude allows you to specify that all the attributes of an XML tag actually become script variables, and you can also define a file that will be included whenever that tag is encountered. That included file can then use the XML attributes as script variables to construct other XML. This is how the Tags reference HTML is generated. Check out the following source location to see how it is done:

tagneto/src/config/tagdoc/TagDocConfig.xml

2. E4X via view:datasource

The script engine in Tagneto is Rhino, which includes E4X, JavaScript language extensions that make it easy to work with XML. The view:xmldatasource tag can be used to load an XML file into a script variable. Then the normal View tags can be used to create the transformed XML. This is how the tagneticconfig HTML reference is generated. Check out the following source location to see how it is done:

tagneticcore/src/xsd/tagdoc/SchemaConfig.xml


Copyright © 2005 tagnetic.org.