- From: Bert Bos <bert@w3.org>
- Date: Thu, 29 Sep 2005 22:36:31 +0200
- To: www-style@w3.org
On Thursday 29 September 2005 16:11, Robin Berjon wrote: > 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; } You're reading much more into it than I meant. If div.content is editable, its content is game: you can change the content in any way you like. The other rules in your example thus have no effect. E.g., assuming your rules and this HTML source: <div> <p>Replace this. </div> the editor will allow you to remove the P element, change its STYLE attribute, insert other Ps before it, etc., anything that is allowed by HTML. > > ? > > 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. I wasn't looking for a way to replace schema languages. I think specifying the syntax of an element's content is out of scope. You can edit the content or you cannot, that's it. The syntax is implicitly restricted in some way already, because the result after editing should be a valid document. There may be ways to link the document to additional, more restrictive schemas, but I didn't want to require that or even define how. We would end up reinventing XForms. 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:36:52 UTC