Re: How could total separation of content (xhtml/xml) and presentation (CSS) be achieved with the Bitflux Editor (or Mozile)?

Simon Rönnqvist <[email protected]> Fri, 4 Mar 2005 11:40:44 +0200
Newsgroups gmane.editors.bitflux.general
Message-ID <[email protected]>
   Hi!

You brought up a good point.

I actually now already started to plan a simple PHP-based custom 
stylesheet generator, let's call it a CSS Management System (CSSMS). It 
should be easily integratable (and work like an almost invisible 
module) with different WYSIWYG editors but also work as a standalone 
PHP-script.

The first thing I had to start thinking about however was how the 
designer would be able to define rules for what the editor could do.
I think some kind of easy to understand XML-file could define something 
like:
<rule>
   <context>div#main img</context>
   <context>p.editable</context>
   <float>
     <value>right</value>
     <value>left</value>
   </float>
</rule>

<rule>
   <context>*</context>
   <context><not>div#main</not></context>
   <text-align>
     <value>justify</value>
     <value>left</value>
   </text-align>
   <font-family>
     <value>serif</value>
     <value>sans-serig</value>
   </font-family>
<rule>

I guess you get the picture... <context> defines what could come 
(wildcards allowed just like in CSS)
HERE { css-properties: ...; } in the CSS.
The other child-nodes of <rule> would just be CSS-properties.
And then their child-nodes would be allowed values.

This is just my first draft of how this could be structured, any 
comments are welcome...
And if somebody would be interested in participating in such a project 
we might as well set it up at sourceforge.net or something...

   -Simon


On Mar 4, 2005, at 11:06, DrSlump wrote:

> Simon Rönnqvist wrote:
>
>> * * * TO THE POINT * * *
>> One thing which I at this point think seems to be missing from the  
>> Bitflux Editor (and Mozile) is an ability to edit external  
>> CSS-properties. :-) It'd be great if one for example could give an  
>> image a specific ID and then in the separate CSS float that element  
>> right or left. To my present understanding (correct me if I'm wrong)  
>> I'd have to specify a class i.e. called left or right, which  
>> semantically wouldn't make any sense. Then I might just as well 
>> specify  a style="float: ..." attribute instead, and then the 
>> separation of  content and style would have failed at that point. 
>> (One could of course  argue wether there's a need for total 
>> separation or not, but let's say  there is. This img floating is just 
>> an example.)
>>
>> Basically what I'd be looking for is an ability to assign ID:s and  
>> classes to elements and then to make certain predefined 
>> css-properties  apply to the ID:s or classes of choise. One could 
>> build a separate  CSS-editor which could be used with any WYSIWYG 
>> xhtml/xml editor that  would allow the user to define class and id 
>> attributes for the  elements. But a better idea would be to integrate 
>> the CSS-editor with  the WYSIWYG so that all style related data (CSS) 
>> would automatically be  separated from the markup (html/xml) without 
>> the user even having to  know about it.
>
> Hi,
>
> With separation of style and contents there is a really nice side 
> effect, contents are managed by an editor (or non technical user) and 
> style is defined by a designer. Allowing the 'editor' to define custom 
> stylesheets it becomes very easy that it'll ruin the designers work :(
> In my opinion if a certain style is needed for the content, the editor 
> should contact the designer and ask him to add the changes he needs.
> Even if for some specific cases, like when the editor and designer are 
> the same person, it'll become quite unmanageable when the site grows 
> in size. Separating the roles of 'editor' and 'designer' makes 
> possible to have a consistent design across the whole site, even if 
> the content is 'imported' from external sources (rss, oo, mail ...).
>
> However, I think that the idea to offer a list of defined classes for 
> an element is great and I don't think it's too dificult to implement.
>
> ciao, Iván
>


-- 
bx-editor-users mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-users