Attribute-based syntax typically uses XML-like attributes to either annotate parts of a Web page (see StructureAnnotation) or to introduce program code into the document (see PythonInWebPage).

See StructureAnnotation for an example.

One stated advantage of attribute-based syntax is that the document can still be manipulated using XML tools and typically be edited using HTML-aware tools. However, not all HTML editors allow the use of arbitrary XML attributes on HTML elements, and the (mis/re)use of permissible HTML attributes may be required. For example:

<table id="annotation:items">
  <tr id="annotation:item">
    <th>Name</th>
    <td>{name}</td>
  </tr>
</table>

Attribute-based syntax is arguably unsuitable for true PythonInWebPage systems, since attributes do not lend themselves to the storage of potentially large pieces of Python code, and indentation could be a major problem. However, programmatic features can be introduced into the attribute values using a restricted subset of Python code - see Zope Page Templates for an example of this kind of thing in action.

AttributeBasedSyntax (last edited 2008-11-15 14:00:37 by localhost)

Unable to edit the page? See the FrontPage for instructions.