[Kss-devel] Server response format

Jeroen Vloothuis jeroen.vloothuis at xs4all.nl
Sun May 13 12:04:19 CEST 2007


Balazs Ree wrote:
> I suggest that unless it turns out that the current transport format is 
> not posible or very difficult to implement from python (which is not the 
> case), stick to it completely.

The reasons that I brought it up are:

A. because I just noticed how it is being done now and as an outsider it 
seems weird.

B. end users of the Python library will need to know what they can pass 
in (in terms of data, do they need to escape it etc.).

> Also what Jeroen writes about the brokenness of current XML is not true: 
> we have the parser class that validates and fixes broken html so we 
> cannot at the moment issue broken xml. I suggest this behaviour is also 
> preserved in the plain python generation. Iow, I do not believe the 
> current solution is broken.

The parser is only used in the commandset. This means that the 
responsibility of escaping is placed on there. In itself this is not a 
problem. But you a decision needs to made if this is the proper place 
for it. I do not want have people depend on a library and then totally 
change it's behaviour.

> On the other hand we can improve the format later if we like to, but 
> since it works perfect at the moment, a real good reason is needed.

How about the example given below. This is something I can generate atm 
with the current Zope integrated code. Because setAttribute does not 
escape anything we get a nicely broken XML document.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:kukit="http://www.kukit.org/commands/1.0"><body>
<kukit:commands>
<kukit:command selector="#target" name="setAttribute"
                selectorType="">
     <kukit:param name="name">name</kukit:param>
     <kukit:param name="value"><h1><table>Hellow</span></kukit:param>
</kukit:command>
</kukit:commands>
</body></html>



More information about the Kss-devel mailing list