Vadim,

...
> >   <uri type="append" src-prefix="documents/" src="index.html"
> >   dest="build/dest/"/> <uri type="replace" src-prefix="documents/"
> >   src="index.html" 
> >dest="build/dest/docs.html"/>
> >   <uri type="insert" src-prefix="documents/" src="index.html" 
> >dest="zip://*.zip/page.html"/>
> 
> It took me some time to understand meaning of "append", "replace",
> "insert". Can we choose some other names for this, and/or combine
> append and replace types together? (What would happen in "replace"
> type while processing more than one page?) Also, what goes instead of
> '*' in "insert"?

Append sticks the uri of the generated page onto the end of the dest uri.
Replace just uses the dest uri, ignoring the uri of the generated page.
Insert lets you put the uri of the generated page into the middle of the dest uri.

Is that any clearer?

I can't see how they can be merged, as they do very different things. However, I'm 
quite open to better names, although I suspect that better explanations might work 
just as well. When posted, I'll publish docs on the Wiki. I'm happy to create xdocs 
too, 
if you can point me in the right direction.

> And one more question... Can you remind me why src-prefix attribute is
> necessary? My guess is that it specifies "base" directory, and no
> crawling happens above it. If my guess is right, attribute can be
> named "src-base"...

The src-prefix is the part of the uri of the generated page that isn't used when 
building 
the destination uri. So if you have src-prefix="documents/" and src="index.html" and 
dest="site/", your final uri would be "site/index.html". 

If you skipped the src-prefix, you'd need src="documents/index.html" instead, which 
would result in "site/documents/index.html". It will then be impossible to get rid of 
the 
'documents' from the URI without creating an entirely new webapp.

> >It is this that breaks the interface to the CocoonBean. Now, instead
> >of passing a Map of destinations, or a single destination, you call
> >addTarget(). There are a number of versions of this method, with
> >increasing functionality:
> >
> >CocoonBean cocoon = new CocoonBean();
> >
> >// Functionality most like before:
> >cocoon.setDestDir("built/dest/");
> >
> 
> CocoonBean was introduced just recently and we had no single beta
> release yet, so I think it's ok to break this interface. If method
> setDestDir is not necessary anymore, feel free to remove it.

It is particularly the removal of the Destination interface that breaks the interface. 
However, removing the setDestDir will certainly make a cleaner interface. I'll do that.

Thanks for your comments.

Upayavira

Reply via email to