Practical mod_perl / HTML Book /



previous page: E.2.1. If Something Goes Wrong
  
page up: HTML Version of the book
  
next page: E.2.3. XPath

E.2.2. How it Works?


The stylesheet above specifies how the various tags work. The ASP <% %>syntax delimits Perl code from HTML. You can execute any code within the stylesheet.

In this example, we use the special XPathScript $t hash reference, which specifies the names of tags and how they should be output to the browser. There are several options for the second level of the hash, and here we see two of those options: pre and post. pre and postspecify (respectfully) what appears before the tag and what appears after it. These values in $t take effect only when we call the apply_templates( ) function, which iterates over the nodes in the XML, executing the matching values in $t.

 

Continue to:

  • prev: E.2.1. If Something Goes Wrong
  • Table of Contents
  • next: E.2.3. XPath







TOP
previous page: E.2.1. If Something Goes Wrong
  
page up: HTML Version of the book
  
next page: E.2.3. XPath


Menu

  • HTML Book
  • PDF Book
  • Download Code
  • Table of Contents
  • Errata
  • mod_perl2 User's Guide
  • Sitemap

Search


Add to Google




Creative Commons License


Written by
Eric Cholet (Logilune) and
Stas Bekman (StasoSphere & Free Books).


[ Privacy Policy | Terms of Use | About Us | Search ]

© 2007 StasoSphere.com