W3C home > Mailing lists > Public > www-svg@w3.org > November 2003

Using templates instead of script to render custom content

From: Cameron McCormack <cam-www-svg@aka.mcc.id.au>
Date: Mon, 3 Nov 2003 10:39:23 +1100
To: www-svg@w3.org
Cc: Kim.Marriott@infotech.monash.edu.au, bernd.meyer@acm.org
Message-ID: <20031102233923.GA21986@mcc.id.au>

The SVG 1.2 Working Draft mentions an alternative to RCC to handle
custom elements in SVG documents, Live Templates.  Though many members
of the SVG community have explored the use of RCC with Adobe's preview
release SVG browser, Live Templates has not received much attention.

The SVG with Constraints project has further developed the extension to
Batik to allow XSLT defined templates in SVG documents.  While not
adopting the exact syntax specified for Live Templates in the Working
Draft, the implementation provided here is somewhat similar.

In this proposal, templates in an SVG document would be rerun as the
source document is modified, as appropriate.  The current implementation
does not currently implement the incremental XSLT execution discussed on
the project web page; this will be provided in a future revision.  This
should not diminish the reasoning behind the use of XSLT instead of
script as the method to implement RCC, however.

Arguments for the use of declarative templates as opposed to script for
the implementation of RCC include:

  - XSLT is a proven XML transformation language.

  - the user agent can more easily make intelligent decisions about
    which parts of the shadow tree should be regenerated when the source
    elements change.

  - animation could be specified on attributes of custom elements and
    the "right thing" would happen.

Examples of what can be achieved with templates have been developed,
including some user interface widgets and general layout elements.

For further information about the template proposal and the examples
with screenshots, please visit:

  http://www.csse.monash.edu.au/~clm/csvg/templates.html

and about the CSVG project as a whole:

  http://www.csse.monash.edu.au/~clm/csvg/

Cameron

-- 
Cameron McCormack
|  Web: http://mcc.id.au/
|  ICQ: 26955922
Received on Sunday, 2 November 2003 18:48:53 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:26 GMT