You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Franz Ruebe <fr...@hotmail.com> on 2005/06/17 18:23:28 UTC

Missing doctype definition in live documents

Hi,

my env: lenya 1.2.3, tomcat 5.0.28, cocoon 2.1.7 on linux

how to get the "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">" in my live-pages?

In all admin/edit/publish-sites there's this doctype definition in the 
html-page.

The Default-HTML-Serializer in lenya/sitemap.xmap has
     <doctype-public>-//W3C//DTD HTML 4.01 Transitional//EN</doctype-public>
     <doctype-system>http://www.w3.org/TR/html4/loose.dtd</doctype-system>
but theres no doctype-definition at all in the live pages.


Thanks in advance

Franz

_________________________________________________________________
MSN Hotmail. Anmelden und gewinnen! http://www.msn.de/email/webbased/ Ihre 
Chance, eines von 10 T-Mobile MDA II zu gewinnen!


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


Re: Missing doctype definition in live documents

Posted by so...@gmail.com.
On 6/18/05, Franz Ruebe <fr...@hotmail.com> wrote:
> After being happy to have no cache activated and seeing changes "on the
> fly", I've had trouble this morning with editing my pub cmsui. These changes
> are not shown instantly, I have to reload lenya with the tomcat manager to
> see my changes.
> 
> Is this in sitemap.xmap the reason?
> <map:transformer name="i18n" logger="sitemap.transformer.i18n"
> src="org.apache.cocoon.transformation.I18nTransformer">
>       <catalogues default="cmsui">
>          <catalogue id="cmsui" name="cmsui"
> location="cocoon://i18n-catalogue/"/>
>        </catalogues>
>        <untranslated-text>untranslated</untranslated-text>
> >>>       <cache-at-startup>true</cache-at-startup>   <<<
>     </map:transformer>

The i18nTransformer keeps caching until the catalogue is released.  I
doubt Lenya ever releases it. "cache-at-startup=true" loads the
catalogues when the servlet starts rather than waiting until they are
needed.

You could write some JS or Java that gets the i18n transformer
component and call recycle(), but it may be easier to restart Lenya
since this function will only be useful during initial development.

You should add a bugzilla request for the function to be added in the
future.  A one-click method to reload all of a publication's settings
(clear the file cache, the language catalogues, logins, flow
continuations, etc.) would be useful.

solprovider

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


Re: Missing doctype definition in live documents

Posted by Franz Ruebe <fr...@hotmail.com>.
Hi,

after beeing happy to have no cache activated and seeing changes "on the 
fly", I've had trouble this morning with editing my pub cmsui. These changes 
are not shown instantly, I have to reload lenya with the tomcat manager to 
see my changes.

Is this in sitemap.xmap the reason?

<map:transformer name="i18n" logger="sitemap.transformer.i18n" 
src="org.apache.cocoon.transformation.I18nTransformer">
      <catalogues default="cmsui">
         <catalogue id="cmsui" name="cmsui" 
location="cocoon://i18n-catalogue/"/>
       </catalogues>
       <untranslated-text>untranslated</untranslated-text>
>>>       <cache-at-startup>true</cache-at-startup>   <<<
    </map:transformer>

Thanks in advance

Franz

_________________________________________________________________
So einfach geht das. MSN Toolbar mit Pop-up-Blocker. http://toolbar.msn.de/ 
Jetzt kostenlos downloaden und gut ist!


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


Re: Missing doctype definition in live documents

Posted by so...@gmail.com.
"Disabling cache for dynamic pages"
Get the code from Bugzilla:
http://issues.apache.org/bugzilla/show_bug.cgi?id=35407

The code in the last post had a bug.  (I forgot to test authoring
before sending.)

solprovider

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


Re: Missing doctype definition in live documents

Posted by so...@gmail.com.
> Gregor J. Rothfuss wrote:
> > as i said in the other thread, the naive caching with the work
> > directory makes this impossible. in my opinion, it should be removed
> > from lenya.
On 6/17/05, Michael Wechner <mi...@wyona.com> wrote:
> in productive environments with heavy load it's very useful.
> Why don't we just DISABLE it by default instead of removing it.

Caching seems very useful, but is incompatible with dynamic sites.  Disable it:
1. When a visitor is logged in.
2. When there is a querystring.

if isLoggedIn:
   Goto normalPipelineWithoutCache
end if
if hasQuerystring: 
   Goto normalPipelineWithoutCache
end if
if Cached:
   useCache
   return
end if
Goto normalPipelineWithoutCache

Here is the code.  I'll put it in Bugzilla now.  Just replace:
<map:match pattern="**.html">
...
</map:match>

With:

<map:match pattern="**.nocache">
   <map:generate
src="cocoon:/lenyabody-view/{page-envelope:publication-id}/{page-envelope:area}/{page-envelope:document-type}{page-envelope:document-url}"/>
     <map:match pattern="authoring/**.nocache">
        <map:transform
src="cocoon://lenya-page/{page-envelope:publication-id}/{../../1}.xml?doctype={page-envelope:document-type}"/>
     </map:match>
     <map:transform src="../../xslt/util/strip_namespaces.xsl"/>
     <map:match pattern="live/**.nocache">
         <map:transform src="../../xslt/authoring/edit/addSourceTags.xsl">
             <map:parameter name="source"
value="{global:cache-dir}/live/{1}.html"/>
         </map:transform>
         <map:transform type="write-source">
             <map:parameter name="serializer" value="html-no-dtd"/>
         </map:transform>
         <map:transform src="../../xslt/authoring/edit/removeSourceTags.xsl"/>
      </map:match>
   <map:serialize type="html"/>
</map:match>

<map:match pattern="**.html">
   <map:act type="language-exists">
      <!-- isLoggedIn? -->
      <map:select type="parameter">
         <map:parameter name="parameter-selector-test"
value="{access-control:user-id}"/>
         <map:when test="">
         </map:when>
        <map:otherwise>
           <map:generate src="cocoon:/{../1}.nocache"/>
           <map:serialize type="html"/>
        </map:otherwise>
      </map:select>
      <!-- hasQueryString? -->
      <map:select type="parameter">
         <map:parameter name="parameter-selector-test"
value="{request:queryString}"/>
         <map:when test="">
         </map:when>
        <map:otherwise>
           <map:generate src="cocoon:/{../1}.nocache"/>
           <map:serialize type="html"/>
        </map:otherwise>
      </map:select>
      <map:select type="resource-exists">
        <!-- Check Cache -->
        <map:when test="{global:cache-dir}/{../1}.html">
           <map:read src="{global:cache-dir}/{../1}.html"
mime-type="text/html"/>
        </map:when>
        <map:otherwise>
           <map:generate src="cocoon:/{../1}.nocache"/>
           <map:serialize type="html"/>
        </map:otherwise>
      </map:select>
   </map:act>
   <!-- There is no version of the requested document-id for the
requested language. -->
   <map:generate type="serverpages"
src="../../content/exception/missing-language.xsp"/>
   <map:transform src="../../xslt/exception/missing-language.xsl"/>
   <map:call resource="style-cms-page"/>
</map:match>

solprovider

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


Re: Missing doctype definition in live documents

Posted by Michael Wechner <mi...@wyona.com>.
Gregor J. Rothfuss wrote:

>
>> When I began with Cocoon and lenya, I was fascinated of the ease to 
>> produce standard-conform html-code. So, afai interpret the ambition 
>> of cocoon/lenya right, these cross-browser-attempt should be managed 
>> by browser-selectors, instead of changing the behaviour of lenya at all.
>
>
> as i said in the other thread, the naive caching with the work 
> directory makes this impossible. in my opinion, it should be removed 
> from lenya.


in productive environments with heavy load it's very useful.
Why don't we just DISABLE it by default instead of removing it.

Michi

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


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


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


Re: Missing doctype definition in live documents

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Franz Ruebe wrote:

> Hmmm. Will that be the "standard-configuration" for 1.4.x (On 
> http://lenya.zones.apache.org:9999/index.html comes "Initialization 
> Problem", so I could'nt look in the html-source there)? On 
> http://lenya.zones.apache.org:8888/default/live/bf0000.html (1.2.4-dev) 
> the doctype is XHTML 1.0 Strict. Will that avoid the mentioned IE problem?

i think it will

> When I began with Cocoon and lenya, I was fascinated of the ease to 
> produce standard-conform html-code. So, afai interpret the ambition of 
> cocoon/lenya right, these cross-browser-attempt should be managed by 
> browser-selectors, instead of changing the behaviour of lenya at all.

as i said in the other thread, the naive caching with the work directory 
makes this impossible. in my opinion, it should be removed from lenya.

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


Re: Missing doctype definition in live documents

Posted by Michael Wechner <mi...@wyona.com>.
Franz Ruebe wrote:

> On http://lenya.zones.apache.org:8888/default/live/bf0000.html 
> (1.2.4-dev) the doctype is XHTML 1.0 Strict. Will that avoid the 
> mentioned IE problem?


I am not sure, but I also remember that IE has some issues re certain DTDs

>
> When I began with Cocoon and lenya, I was fascinated of the ease to 
> produce standard-conform html-code. So, afai interpret the ambition of 
> cocoon/lenya right, these cross-browser-attempt should be managed by 
> browser-selectors, instead of changing the behaviour of lenya at all.


agreed. Btw, the caching can also be done in connection with Browser 
selection,
but you basically would have two caches. I will disable the caching 
within the dev versions for the moment and hope that this way we can 
make people happy on both sides.

Michi

>
> Best regards
>
> Franz
>
> _________________________________________________________________
> Nicht lange suchen – finden! MSN Suche. http://search.msn.de/ Jetzt 
> testen!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


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


Re: Missing doctype definition in live documents

Posted by Franz Ruebe <fr...@hotmail.com>.
Hi Gregor,

thanks for your answer,

>>So I think it would make sense to define the same doctype for live-sites 
>>then for publishing to avoid different looking and character-behaviour 
>>(and driving newbies nuts :-)). What is the advantage of having 
>>no-dtd-html?

Gregor wrote:
>it was added to cope with some IE problems if i remember correctly

Hmmm. Will that be the "standard-configuration" for 1.4.x (On 
http://lenya.zones.apache.org:9999/index.html comes "Initialization 
Problem", so I could'nt look in the html-source there)? On 
http://lenya.zones.apache.org:8888/default/live/bf0000.html (1.2.4-dev) the 
doctype is XHTML 1.0 Strict. Will that avoid the mentioned IE problem?

When I began with Cocoon and lenya, I was fascinated of the ease to produce 
standard-conform html-code. So, afai interpret the ambition of cocoon/lenya 
right, these cross-browser-attempt should be managed by browser-selectors, 
instead of changing the behaviour of lenya at all.

Best regards

Franz

_________________________________________________________________
Nicht lange suchen – finden! MSN Suche. http://search.msn.de/ Jetzt testen!


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


Re: Missing doctype definition in live documents

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Franz Ruebe wrote:

> So I think it would make sense to define the same doctype for live-sites 
> then for publishing to avoid different looking and character-behaviour 
> (and driving newbies nuts :-)). What is the advantage of having 
> no-dtd-html?

it was added to cope with some IE problems if i remember correctly

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


Re: Missing doctype definition in live documents

Posted by Franz Ruebe <fr...@hotmail.com>.
Hi Gregor,

>search for html-nodtd in publication-sitemap.xmap and change it to html

many thanks for your answer! Now it works! (And knowing where to change, 
it's obvious...)

Still got some remarks: Some Browser differ in css and whitespace-handling, 
depending on given doctype. So I had a problem in a different looking of my 
"search-box" on authoring and live-sites. Thinking of coming from 
cache-problems I tried several hours ... till I "found" the missing doctype.

You perhaps remember my garbage character-problem. Searching from the 
live-sites still brought garbage-characters. To avoid that, I had to change 
my browser-coding to utf-8. After changing the serializer to html, this work 
now fine.

So I think it would make sense to define the same doctype for live-sites 
then for publishing to avoid different looking and character-behaviour (and 
driving newbies nuts :-)). What is the advantage of having no-dtd-html?


Best regards

Franz

_________________________________________________________________
Machen Sie lästigen E-Mails ein Ende. MSN Hotmail mit Junk-Mail-Filter. 
http://www.msn.de/antispam/prevention/junkmailfilter Jetzt kostenlos 
anmelden!


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


Re: Missing doctype definition in live documents

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Franz Ruebe wrote:

> The Default-HTML-Serializer in lenya/sitemap.xmap has
>     <doctype-public>-//W3C//DTD HTML 4.01 Transitional//EN</doctype-public>
>     <doctype-system>http://www.w3.org/TR/html4/loose.dtd</doctype-system>
> but theres no doctype-definition at all in the live pages.

search for html-nodtd in publication-sitemap.xmap and change it to html

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