Introduction

This tutorial is intended to teach Velocity for use with Hannon Hill's Cascade Server CMS.  This is a mirror of the content found at the W3Schools XSLT tutorial to be a side by side learning tool for moving from XSLT to Velocity.  All examples use this xml data file - cdcatalog.xml

Velocity or Velocity Script is a language for transforming XML documents into XHTML documents or to other XML documents.

XPath is a language for navigating in XML documents.

What You Should Already Know

Before you continue you should have a basic understanding of the following:

If you want to study these subjects first, find the tutorials on the W3Schools Home page.

What is Velocity?

Velocity Uses XPath

Velocity uses XPath to find information in an XML document. XPath is used to navigate through elements and attributes in XML documents.

If you want to study XPath first, please read the  W3Schools XPath Tutorial.

How Does it Work?

In the transformation process, Velocity uses XPath to traverse parts of a source document that should match one or more predefined templates and mixes in scritping to produce an XML or XHTML output.  

Resources

Back to Top