Successfully reported this slideshow.
VELOCITY 101 BY PENNY KRONZ
PSA• Cascade Server will always support XSLT  development
WHAT IS XSLT & VELOCITY?• Formatting language for XML• In other words, translates XML into another  language• Why is this ...
TRAVERSING XML• XSLT  • <xsl:apply-templates select=“/path/to/node”/>  • <xsl:template match=“node”/>• Velocity  • $_XPath...
COMMON SYNTAX• Variables  • #set ($myVar = “content value”)• Loops  • #foreach ($item in $items) Output Content #end  • <x...
ADVANTAGES IN VELOCITY•   Based on Java•   Grouping•   Conditional closing tags•   More built-in Date functionality•   Mat...
ADVANTAGES TO XSLT• Testing code outside of Cascade Server• Advanced editors outside of Cascade Server
COMMENT/QUESTIONS?
Penny Kronzpenny@hannonhill.com678.904.6900 ext 255
Upcoming SlideShare
Loading in …5
×

Velocity 101 in Cascade Server CMS, by Penny Harding

1,731 views

Published on

Since last year's conference, there have been many additions to the available Velocity tools. This presentation will be for Cascade Server users, new and old, and Penny we will demonstrate some of the most popular and newer Velocity tools and syntax. She will draw from existing XSLT scripts to draw parallels on best practices and how-to's for translating XML. This session is also meant to be a primer for new technical users of Cascade Server introducing them to Velocity and XPATH syntax.

  • Be the first to comment

  • Be the first to like this

Velocity 101 in Cascade Server CMS, by Penny Harding

  1. 1. VELOCITY 101 BY PENNY KRONZ
  2. 2. PSA• Cascade Server will always support XSLT development
  3. 3. WHAT IS XSLT & VELOCITY?• Formatting language for XML• In other words, translates XML into another language• Why is this important?
  4. 4. TRAVERSING XML• XSLT • <xsl:apply-templates select=“/path/to/node”/> • <xsl:template match=“node”/>• Velocity • $_XPathTool.selectNodes($contentRoot, “/path/to/node”) • $_XPathTool.selectSingleNode($contentRoot, “/path/to/no de”) • $contentRoot.getChild(“path”).getChild(“to”).getChild(“no de”) • $contentRoot.getChildren()
  5. 5. COMMON SYNTAX• Variables • #set ($myVar = “content value”)• Loops • #foreach ($item in $items) Output Content #end • <xsl:for-each>Output Content</xsl:for-each>• Conditional Statements • #if ($value == “value”) Output Content #end • <xsl:if test=“$value = „value‟”> Output Content </xsl:if>• Dates
  6. 6. ADVANTAGES IN VELOCITY• Based on Java• Grouping• Conditional closing tags• More built-in Date functionality• Math• Arrays• Breaking out of loops• LEARNING CURVE
  7. 7. ADVANTAGES TO XSLT• Testing code outside of Cascade Server• Advanced editors outside of Cascade Server
  8. 8. COMMENT/QUESTIONS?
  9. 9. Penny Kronzpenny@hannonhill.com678.904.6900 ext 255

×