Edgewall Software

Changes between Version 10 and Version 11 of MarkupTemplates


Ignore:
Timestamp:
Jul 9, 2006, 7:51:17 PM (18 years ago)
Author:
cmlenz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MarkupTemplates

    v10 v11  
    33The most important feature provided by the Markup package is a template engine.
    44
    5 Templates are XML files of some kind (such as XHTML) that include ''processing directives'' identified by the namespace `http://markup.edgewall.org/` and ''template expressions'' that are dynamically substituted by variable data.
     5Templates are XML files of some kind (such as XHTML) that include ''[wiki:MarkupTemplates#TemplateDirectives processing directives]'' (elements or attributes identified by a separate namespace) that affect how the template is rendered, and ''[wiki:MarkupTemplates#TemplateExpressions template expressions]'' that are dynamically substituted by variable data.
    66
    77[[PageOutline(2-3, Table of Contents, inline)]]
     
    5757== Template Directives ==
    5858
     59''Directives'' are elements and/or attributes in the template that are identified by the namespace `http://markup.edgewall.org/`. They can affect how the template is rendered in a number of ways: Markup provides directives for conditionals and looping, among others.
     60
     61To use directives in a template, the namespace should be declared, which is usually done on the root element:
     62
     63{{{
     64<html xmlns="http://www.w3.org/1999/xhtml"
     65      xmlns:py="http://markup.edgewall.org/"
     66      lang="en">
     67  ...
     68</html>
     69}}}
     70
     71In this example, the default namespace is set to the XHTML namespace, and the namespace for Markup directives is bound to the prefix “py”.
     72
    5973=== `py:content` ===
    6074