W3C home > Mailing lists > Public > www-style@w3.org > September 2005

Re: Simple template-based editing

From: Bert Bos <bert@w3.org>
Date: Thu, 29 Sep 2005 22:39:10 +0200
To: www-style@w3.org
Message-Id: <200509292239.10489.bert@w3.org>

On Thursday 29 September 2005 19:11, Ian Hickson wrote:
> On Thu, 29 Sep 2005, Bert Bos wrote:
> > Presumably, the server will check what you send back, but assuming
> > that you are trying to do the right thing, it would be good if the
> > server could tell your browser/editor in a machine-readable way
> > what changes are allowed.
>
> Indeed. However, this seems like a semantic thing, not a stylistic
> thing. You wouldn't want the document to only be editable if it was
> styled, for instance. You'd want it to be editable regardless of what
> stylesheet was applied.

Sure, it is only a hint. You're free to ignore or override it.

I agree it is also not very stylistic.

But it should also not be an attribute, because then every document 
format you might want to have templates for would need to include that 
attribute.

The generic solution for templates is probably to build them on top of 
XForms. I think the fixed parts of the template would appear twice 
(once in the <model> and once in the <body>), but apart from that 
inconvenience, it has everything that is needed: <instance> gives you 
example text to put in the editable parts, <bind> tells you what schema 
applies to each editable part. You can even include online help with 
the template.

(Somebody already proposed to allow an Xforms document to appear as the 
target of a <link rel=stylesheet> for that very purpose, but I think 
that is problematic. That would preclude having both a CSS style sheet 
to style the page and a template to edit it.)

But between the power & complexity of Xforms and the simplicity & 
limitations of an attribute, there may just be room for something that 
is as simple as the attribute, but just a little bit more powerful.

I don't know, but I'm asking...

>
> IE invented contentEditable for doing something similar to what you
> describe, btw. (contentEditable is being specified in the WHATWG
> specs: http://whatwg.org/specs/web-apps/current-work/#editing
> ...so that it can be more interoperably implemented in other UAs.)

The property/attribute may not have much stylistic semantics, but it 
doesn't have content semantics either. HTML isn't a template format, so 
template semantics should be kept separate from it.

And, as I said, you can have templates for anything, not just for HTML. 
An attribute in HTML would solve only the HTML case.

You say "more interoperably implemented," but what UAs implement it, 
apart from IE? I checked Dreamweaver (uses comments), GoLIve (comments, 
too, it seems), Nvu (different attributes) and Quanta (separate format 
for templates). Amaya and Mozilla Composer don't use templates.



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos                               W3C/ERCIM
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France
Received on Thursday, 29 September 2005 20:39:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:40 GMT