This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Dynamic HTML template compiler with XSS language support.

Project Description

This package implements a template compiler for dynamic HTML documents. In particular, it supports the XSS rule language which is used to associate elements with dynamic content.

XSS rule language

The XSS rule language uses a CSS-compliant syntax to let you match HTML elements using CSS selectors and set up dynamic content definitions.

To associate a template with a rule file, use the <link> tag:

<link rel="xss" type="text/xss" src="rules.xss" />

XSS files contain rules like the following:

html > head > title {
  name: document-heading;
  structure: true;
  attributes: document-attributes;
  mode: content;
}

This rule will associate the <title> tag with the dynamic content identifier “document-heading”, escape the inserted content and apply the dynamic attributes bound to the “document-attributes” identifier.

See the file template.txt within the package for documentation on how to render templates and provide dynamic content and attributes.

Syntax

Brief explanation of the properties in the XSS format:

@name        dynamic content slot name
@structure   if set to true, inserts content without escaping
@attributes  inserts dynamic attributes into tag
@mode        one of ('content', 'append', 'prepend')

Resource rebase functionality

If a resource location adapter is available (see chameleon.html.interfaces.IResourceLocation), references resources (e.g. images, stylesheets, javascripts) will be “rebased” to the URL returned by the component.

Release History

Release History

History Node

1.0b4

History Node

1.0b3

History Node

1.0b2

History Node

1.0b1

This version
History Node

0.9.3

History Node

0.9.2

History Node

0.9.1

History Node

0.9

History Node

0.8

History Node

0.7

History Node

0.6

History Node

0.5

History Node

0.4

History Node

0.3

History Node

0.2

History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
chameleon.html-0.9.3.tar.gz (12.0 kB) Copy SHA256 Checksum SHA256 Source Feb 13, 2009

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting