GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Python Wiki
  • PSF Wiki
  • Jython Wiki
  • Python Wiki
  • Archive

This view

  • Original page
  • New address

GeezerVison is showing wiki.python.org — Attribute Based Syntax

View as Markdown

Attribute Based Syntax¶

Legacy Wiki Page

This page was migrated from the old MoinMoin-based wiki. Information may be outdated or no longer applicable. For current documentation, see python.org.

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.

Previous
Attendee Notes
Next
Aug 2001 DB API 3 Strawman
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.