[Seaside-dev] XML Markups and Canvases

Lukas Renggli renggli at gmail.com
Fri Nov 7 21:39:16 UTC 2008


> But with more and more specific markup languages the interface of this class gets bloated and
> there may be more and more naming conflicts. Traits may help here - but they are
> not portable.

The problem is mainly that there will be name clashes. For example
there is a <text> element in SVG, but WARenderCanvas already
implements #text: for something else.

> Another (better) approach would be to provide a separate render canvas class as the
> SVG project [2] currently does where one is able to implement the tag methods.

I think this is the way to go. This is also done by the RSS project for example.

> Another idea could be to have a combined render canvas where you select the
> right canvas before you "draw".

This is done with the JavaScript integration.

" gives you a new canvas to instantiate script.aculo.us objects "
html scriptaculous

" gives you a new canvas to build jQuery expressions (Seaside 2.9) "
html jQuery

It was not like this from the beginning, but as the JavaScript part of
the script.aculo.us library grew over time it became necessary because
we suddenly had conflicts. I think that all extension to the standard
HTML canvas should use this way.

> 1. What is the best way to deal with many markups in Seaside and is there any
>   (standardized) support/pattern to support more XML like languages or a canvas mix?

It is easy to swap the canvas on the fly, no? Maybe we could even
provide a generic convertor method, so that one could write:

svg := html as: SVGCanvas

> 2. Some of these XML languages provide an DTD/XSD, is there already some tool
>    support to get an initial implementation from such a metadescription.

No. The problem is that Smalltalk has no decent support for DTD and
Schema parsing. At least this was my impression when I tried to do
something like this a few years back. Furthermore (at least this is
what we do for the HTML canvas) we want intention revealing names, not
cryptic names from the actual definition. So for example, the
attribute 'href' is called #url:, and the <br> tag is called #break.

Cheers,
Lukas

-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the seaside-dev mailing list