You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Jeff Turner <je...@apache.org> on 2003/09/21 09:25:22 UTC

CLI: does confirm-extensions work?

Hi,

Over in Forrest, various people want to output files with .shtml or .php
extensions instead of .html.

I thought this would be a matter of overriding
org/apache/cocoon/util/mime.types to redefine the text/html extension, and
setting confirm-extensions="true" in cli.xconf.  It works for the first file,
but seems to disable link following:

------------------------------------------------------------------------ 
cocoon 2.1.2-dev
Copyright (c) 1999-2003 Apache Software Foundation. All rights reserved.
------------------------------------------------------------------------ 


* [0/0]      13.001s 23.2Kb  index.html
Total time: 0 minutes 17 seconds

------------------------------

Is this a bug or am I doing something wrong?  If it's a bug I'll file in
bugzilla (it's not an important/pressing issue).

Thanks,


--Jeff

Re: CLI: does confirm-extensions work?

Posted by Upayavira <uv...@upaya.co.uk>.
Jeff Turner wrote:

>On Sun, Sep 21, 2003 at 11:37:20AM +0100, Upayavira wrote:
>  
>
>>Jeff Turner wrote:
>>
>>    
>>
>>>Hi,
>>>
>>>Over in Forrest, various people want to output files with .shtml or .php
>>>extensions instead of .html.
>>>
>>>
>>>I thought this would be a matter of overriding
>>>org/apache/cocoon/util/mime.types to redefine the text/html extension, and
>>>setting confirm-extensions="true" in cli.xconf.  It works for the first 
>>>file,
>>>but seems to disable link following:
>>>
>>>
>>>      
>>>
>>There's two issues here:
>>1) How to output other extensions.
>>2) Link following with confirm-extensions
>>
>>So, if you've got confirm-extensions set to false, as far as I can see, 
>>your extension will be whatever your pattern is in your sitemap 
>>(<map:match pattern="foo.shtml"> should generate foo.shtml without any 
>>problem. Are you finding that you can't do this.
>>    
>>
>
>No, quite probably that would work, but would require tracking down and
>modifying every URL on the site.
>  
>
So you're saying that you want to rewrite the URIs from foo.html to 
foo.shtml for the entire site?

Hmm. As I understand it, the confirm-extensions approach would rewrite 
foo.html to foo.html.shtml if you override the mime-type setting for 
html, which isn't quite what you want.

And to switch back to link-view/confirm-extensions would cause a serious 
slow down in performance (average generation on docs without confirming 
extensions: 1.5min, with link view/confirming 11min). I think this is 
because of the persistent store 'enhancements'. I am thinking of 
proposing that confirm-extensions is switched off by default, because of 
this difference in performance.

>>Link following with confirm-extensions="true": I regularly run it on the 
>>docs (I always generate the docs with confirmation on, then off before 
>>committing changes). So it works for me. Can you explain what you're doing?
>>    
>>
>Oh okay, if it works for someone then I'm happy.  In CVS Forrest, if I
>edit src/documentation/conf/cli.xconf, set confirm-extensions="true", run
>./build.sh and then ./build/dist/shbat/bin/forrest, it renders index.html
>and then exits.  I'll have a look tomorrow to see what Forrest is doing
>differently.
>  
>
That would be good. It certainly shouldn't be behaving as you describe. 
Keep me posted.

>>Oh, I did add an element to cli.xconf:
>><include-links extension=".html"/>
>>With this not present, all pages are scanned for links. Without it, only 
>>those mentioned with a node like this are scanned. I assume you haven't 
>>got one of them in your cli.xconf.
>>    
>>
>Nope.
>  
>
Okay.

Regards, Upayavira




Re: CLI: does confirm-extensions work?

Posted by Jeff Turner <je...@apache.org>.
On Sun, Sep 21, 2003 at 11:37:20AM +0100, Upayavira wrote:
> Jeff Turner wrote:
> 
> >Hi,
> >
> >Over in Forrest, various people want to output files with .shtml or .php
> >extensions instead of .html.
> > 
> >
> >I thought this would be a matter of overriding
> >org/apache/cocoon/util/mime.types to redefine the text/html extension, and
> >setting confirm-extensions="true" in cli.xconf.  It works for the first 
> >file,
> >but seems to disable link following:
> > 
> >
> There's two issues here:
> 1) How to output other extensions.
> 2) Link following with confirm-extensions
> 
> So, if you've got confirm-extensions set to false, as far as I can see, 
> your extension will be whatever your pattern is in your sitemap 
> (<map:match pattern="foo.shtml"> should generate foo.shtml without any 
> problem. Are you finding that you can't do this.

No, quite probably that would work, but would require tracking down and
modifying every URL on the site.

> Link following with confirm-extensions="true": I regularly run it on the 
> docs (I always generate the docs with confirmation on, then off before 
> committing changes). So it works for me. Can you explain what you're doing?

Oh okay, if it works for someone then I'm happy.  In CVS Forrest, if I
edit src/documentation/conf/cli.xconf, set confirm-extensions="true", run
./build.sh and then ./build/dist/shbat/bin/forrest, it renders index.html
and then exits.  I'll have a look tomorrow to see what Forrest is doing
differently.

> Oh, I did add an element to cli.xconf:
> <include-links extension=".html"/>
> With this not present, all pages are scanned for links. Without it, only 
> those mentioned with a node like this are scanned. I assume you haven't 
> got one of them in your cli.xconf.

Nope.

Cheers,


--Jeff

> Regards, Upayavira
> 

Re: CLI: does confirm-extensions work?

Posted by Upayavira <uv...@upaya.co.uk>.
Jeff Turner wrote:

>Hi,
>
>Over in Forrest, various people want to output files with .shtml or .php
>extensions instead of .html.
>  
>
>I thought this would be a matter of overriding
>org/apache/cocoon/util/mime.types to redefine the text/html extension, and
>setting confirm-extensions="true" in cli.xconf.  It works for the first file,
>but seems to disable link following:
>  
>
There's two issues here:
1) How to output other extensions.
2) Link following with confirm-extensions

So, if you've got confirm-extensions set to false, as far as I can see, 
your extension will be whatever your pattern is in your sitemap 
(<map:match pattern="foo.shtml"> should generate foo.shtml without any 
problem. Are you finding that you can't do this.

Link following with confirm-extensions="true": I regularly run it on the 
docs (I always generate the docs with confirmation on, then off before 
committing changes). So it works for me. Can you explain what you're doing?

Oh, I did add an element to cli.xconf:
<include-links extension=".html"/>
With this not present, all pages are scanned for links. Without it, only 
those mentioned with a node like this are scanned. I assume you haven't 
got one of them in your cli.xconf.

Regards, Upayavira


>------------------------------------------------------------------------ 
>cocoon 2.1.2-dev
>Copyright (c) 1999-2003 Apache Software Foundation. All rights reserved.
>------------------------------------------------------------------------ 
>
>
>* [0/0]      13.001s 23.2Kb  index.html
>Total time: 0 minutes 17 seconds
>
>------------------------------
>
>Is this a bug or am I doing something wrong?  If it's a bug I'll file in
>bugzilla (it's not an important/pressing issue).
>
>Thanks,
>
>
>--Jeff
>
>  
>