> When running Cocoon as a command line tool, how does Cocoon determine
> what to name the resulting files?  I assume the URI you specify after
> the options is matched by one of the matchers in the sitemap, and so I
> know where processing starts, but since a serializer, when run as a
> web app, streams to a servlet/browser, where does output go when using
> the CLI?

The 2.0.4 CLI checks the mime type of the page, and derives the filename from the 
URI after ensuring that the file extension is correct. Thus, a text/html page called 
'foo' 
would become foo.html.

The 2.1 CLI in CVS has functions to prevent this extension checking, which means 
that the resulting filename is the URI (less ? and # characters, etc). [it does still 
have 
one or two bugs to be ironed out, though].

> I've searched all the web links, books, FAQs and mailing lists, but I
> can find very little on using the CLI.  I found an example in
> build.xml, but I still don't understand how the output filenames are
> determined.  For example, if I have a match element for
> "usersguide.fo" that passes it to the fo2pdf serializer (FOP), how do
> I indicate the output PDF filename?  

See http://wiki.cocoondev.org/Wiki.jsp?page=CommandLine for more info.

The best way to handle filenames is to simply make the URI a valid filename, e.g. 
userguide.pdf, if you want to use the CLI.

Regards, Upayavira

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to