Re: Simple template-based editing

Bert Bos wrote:
(interesting stuff elided)
> So how about a property in CSS3
> 
>     Name: editable
>     Value: auto | one | zero-or-one | zero-or-more | one-or-more
>     Initial: auto
>     Inherited: no
> 
> to indicate that an element is a template or not? ('Auto' means it 
> depends on whether the server supports PUT or an equivalent method. 
> Better keywords welcome...)

This is interesting, allow me to make sure that I've understood it 
correctly. Say I have this page and I only want the users to be able to 
perform some editing inside the <div> of class "content", and in that 
they can put <p> or <img>, and inside <p> only <em>, <strong>, and <img> 
(to keep things simple). Would that result in:

div.content { editable: one; }
div.content > p { editable: one-or-more; }
div.content > img { editable: zero-or-more; }
div.content > p em,
div.content > p strong,
div.content > p img  { editable: zero-or-more; }

?

The bit I don't really get is in which way is this an improvement over 
schema languages that already exist and unlike XML Schema are actually 
easy to implement such as RelaxNG (or RelaxNG Compact, which has a 
simple, non-XML syntax) or Schematron? The implementation complexity 
difference between what you propose and what they do is not very high, 
yet they can also usefully constrain several other aspects that you may 
be interested in (such as the general ones you mention). Also, there are 
existing deployed implementations of precisely that based on those 
technologies, eg. guided editing in nXML, oXygen, etc.

-- 
Robin Berjon
   Senior Research Scientist
   Expway, http://expway.com/

Received on Thursday, 29 September 2005 14:11:36 UTC