Zoo tutorials: [ SQL | Java | Linux | XML ]

A Gentle Introduction to xml


This tool transforms XML using the associated XSL. The xalan processor is used.

Working the hierarchy

In previous examples we relied on the xsl processor "walking-over" the tree in it's default way. There are some things that we cannot do using this mechanism - most notably we cannot create a table of our results.


In previous examples we processed documents that were "data-oriented". None of the nodes contained character data.

"Narrative oriented" XML (such as XHTML) includes such text.

Programming with xsl, part one

XSL offers variables and parameters.

Programming with xsl

We can write programs in xsl but there are some restrictions. Perhaps the most important is that we cannot have variables that change.

The identity stylesheet.

The identity stylesheet copies the input to the output. Our sheet here is good enough - it does not preserve white-space, nor does it preserve comments.

XSL produces SVG

In this example we produce SVG. Notice that there are two g nodes - one performs a translation and one a rotation.

Adding to xhtml

We can add our own tags to html. We can use xsl to implement additional features - here we want to implement a new tag <hint>.

Answers: [XML and XSL] [Working the hierarchy] [XSL on XHTML.] [Programming with xsl, part one] [Programming with xsl] [The identity stylesheet.] [XSL produces SVG] [Adding to xhtml]