You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Richard Frovarp <Ri...@sendit.nodak.edu> on 2007/05/29 20:42:59 UTC

clean-xhtml.xsl additions

I've got a couple of additions to clean-xhtml.xsl that I wanted to see 
what others thought.

1) Make sure the title element is not empty. This will cause problems 
when trying to edit pages with IE, as the element will collapse. If it 
is empty, insert the text Title.

2) Strip out the spellcheck="false" attribute from the body tag that 
FCKeditor sticks in to turn off Firefox's spell checking feature.

WDOT?

Richard

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: clean-xhtml.xsl additions

Posted by Joern Nettingsmeier <ne...@folkwang-hochschule.de>.
Richard Frovarp wrote:

>> well, then just put the fck stuff there, too. but we should make a 
>> huge mental note that each editor module should do their own 
>> pre-processing and cleanup in the future...
>>
> 
> This is post-processing. I do see that kupu does its own pre-processing, 
> which I'm going to be copying part of for fck. What is needed is for the 
> editors to do their own post-processing and include a global 
> post-processing file, such as clean-xhtml.xsl. All of the editor don't 
> have anything to lose converting i to em for example. No need to 
> replicate that step 4 or more times.

i like the idea of a global post-processing xslt very much - i'll file a 
reminder bug in bugzilla.

-- 
jörn nettingsmeier

home://germany/45128 essen/lortzingstr. 11/
http://spunk.dnsalias.org
phone://+49/201/491621

Kurt is up in Heaven now.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: clean-xhtml.xsl additions

Posted by Richard Frovarp <Ri...@sendit.nodak.edu>.
>>
>>>> 1) Make sure the title element is not empty. This will cause 
>>>> problems when trying to edit pages with IE, as the element will 
>>>> collapse. If it is empty, insert the text Title.
>>>
>>> yeah, we need a couple of those. empty textareas, scripts and divs 
>>> confuse firefox... shouldn't we add &#160; rather than "Title"? we 
>>> don't want those placeholders to end up in published pages...
>>>
I just tested &#160;. FCK, Kupu, and BXE all convert it to a space. I'm 
not sure how well it is preserved when written back out. I'll go with 
&#160; for now. We'll see if any problems show up. I think I had issues 
in the past with FCKeditor under IE due to title issues. I can't 
replicate them now. I can however create problems with Kupu at the 
moment, so this step is needed.

>>>> 2) Strip out the spellcheck="false" attribute from the body tag 
>>>> that FCKeditor sticks in to turn off Firefox's spell checking feature.
>>>
>>> if you're talking about an fckeditor-specific clean-xhtml.xsl, 
>>> that's fine. if it's global, i'd rather we do editor-specific 
>>> cleanups in the respective modules...
>>>
>>>
>> Looks like I already got someone to apply this one. The file already 
>> imports kupu and bxe specific files. It also converts img tags to 
>> object tags, which FCK doesn't like. From what I can see at the 
>> moment, Kupu and BXE don't have their own editor-specific cleanup 
>> file either, just their own import files. In fact the Kupu one has 
>> duplication from the main file. I don't see anything preventing 
>> either one from being ran when that specific editor isn't being used. 
>> I'm not sure what it would take to change is so each editor would 
>> only use their specific file.
>
> well, then just put the fck stuff there, too. but we should make a 
> huge mental note that each editor module should do their own 
> pre-processing and cleanup in the future...
>

This is post-processing. I do see that kupu does its own pre-processing, 
which I'm going to be copying part of for fck. What is needed is for the 
editors to do their own post-processing and include a global 
post-processing file, such as clean-xhtml.xsl. All of the editor don't 
have anything to lose converting i to em for example. No need to 
replicate that step 4 or more times.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: clean-xhtml.xsl additions

Posted by Joern Nettingsmeier <ne...@folkwang-hochschule.de>.
Richard Frovarp wrote:
> Joern Nettingsmeier wrote:
>> Richard Frovarp wrote:
>>> I've got a couple of additions to clean-xhtml.xsl that I wanted to 
>>> see what others thought.
>>
>> where is that one used again? post-editing? is that a global or 
>> fckeditor-specific file?
>>
> 
> Post editing. And it is a global file: 
> src/modules/xhtml/xslt/clean-xhtml.xsl
> 
>>> 1) Make sure the title element is not empty. This will cause problems 
>>> when trying to edit pages with IE, as the element will collapse. If 
>>> it is empty, insert the text Title.
>>
>> yeah, we need a couple of those. empty textareas, scripts and divs 
>> confuse firefox... shouldn't we add &#160; rather than "Title"? we 
>> don't want those placeholders to end up in published pages...
>>
> If we have the need for more place holders, that might make sense. I 
> think I've ran into problems, however. Sticking &#160; into empty divs 
> could cause problems. I'll have to check it out. The title element from 
> the content file isn't used to generate the real page title, at least 
> not following the default publication system.

ah, ok. that is moot, then.

>>> 2) Strip out the spellcheck="false" attribute from the body tag that 
>>> FCKeditor sticks in to turn off Firefox's spell checking feature.
>>
>> if you're talking about an fckeditor-specific clean-xhtml.xsl, that's 
>> fine. if it's global, i'd rather we do editor-specific cleanups in the 
>> respective modules...
>>
>>
> Looks like I already got someone to apply this one. The file already 
> imports kupu and bxe specific files. It also converts img tags to object 
> tags, which FCK doesn't like. From what I can see at the moment, Kupu 
> and BXE don't have their own editor-specific cleanup file either, just 
> their own import files. In fact the Kupu one has duplication from the 
> main file. I don't see anything preventing either one from being ran 
> when that specific editor isn't being used. I'm not sure what it would 
> take to change is so each editor would only use their specific file.

well, then just put the fck stuff there, too. but we should make a huge 
mental note that each editor module should do their own pre-processing 
and cleanup in the future...

-- 
jörn nettingsmeier

home://germany/45128 essen/lortzingstr. 11/
http://spunk.dnsalias.org
phone://+49/201/491621

Kurt is up in Heaven now.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: clean-xhtml.xsl additions

Posted by Richard Frovarp <Ri...@sendit.nodak.edu>.
Joern Nettingsmeier wrote:
> Richard Frovarp wrote:
>> I've got a couple of additions to clean-xhtml.xsl that I wanted to 
>> see what others thought.
>
> where is that one used again? post-editing? is that a global or 
> fckeditor-specific file?
>

Post editing. And it is a global file: 
src/modules/xhtml/xslt/clean-xhtml.xsl

>> 1) Make sure the title element is not empty. This will cause problems 
>> when trying to edit pages with IE, as the element will collapse. If 
>> it is empty, insert the text Title.
>
> yeah, we need a couple of those. empty textareas, scripts and divs 
> confuse firefox... shouldn't we add &#160; rather than "Title"? we 
> don't want those placeholders to end up in published pages...
>
If we have the need for more place holders, that might make sense. I 
think I've ran into problems, however. Sticking &#160; into empty divs 
could cause problems. I'll have to check it out. The title element from 
the content file isn't used to generate the real page title, at least 
not following the default publication system.

>> 2) Strip out the spellcheck="false" attribute from the body tag that 
>> FCKeditor sticks in to turn off Firefox's spell checking feature.
>
> if you're talking about an fckeditor-specific clean-xhtml.xsl, that's 
> fine. if it's global, i'd rather we do editor-specific cleanups in the 
> respective modules...
>
>
Looks like I already got someone to apply this one. The file already 
imports kupu and bxe specific files. It also converts img tags to object 
tags, which FCK doesn't like. From what I can see at the moment, Kupu 
and BXE don't have their own editor-specific cleanup file either, just 
their own import files. In fact the Kupu one has duplication from the 
main file. I don't see anything preventing either one from being ran 
when that specific editor isn't being used. I'm not sure what it would 
take to change is so each editor would only use their specific file.

Richard

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: clean-xhtml.xsl additions

Posted by Joern Nettingsmeier <ne...@folkwang-hochschule.de>.
Richard Frovarp wrote:
> I've got a couple of additions to clean-xhtml.xsl that I wanted to see 
> what others thought.

where is that one used again? post-editing? is that a global or 
fckeditor-specific file?

> 1) Make sure the title element is not empty. This will cause problems 
> when trying to edit pages with IE, as the element will collapse. If it 
> is empty, insert the text Title.

yeah, we need a couple of those. empty textareas, scripts and divs 
confuse firefox... shouldn't we add &#160; rather than "Title"? we don't 
want those placeholders to end up in published pages...

> 2) Strip out the spellcheck="false" attribute from the body tag that 
> FCKeditor sticks in to turn off Firefox's spell checking feature.

if you're talking about an fckeditor-specific clean-xhtml.xsl, that's 
fine. if it's global, i'd rather we do editor-specific cleanups in the 
respective modules...


-- 
jörn nettingsmeier

home://germany/45128 essen/lortzingstr. 11/
http://spunk.dnsalias.org
phone://+49/201/491621

Kurt is up in Heaven now.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org