You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Olson, Dave -Systems" <Da...@itt.com> on 2003/03/27 03:22:09 UTC

CLI output file names

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?

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?  

puzzled,
DAvid Olson


 



************************************ 
If this email is not intended for you, or you are not responsible for the
delivery of this message to the addressee, please note that this message may
contain ITT Privileged/Proprietary Information.  In such a case, you may not
copy or deliver this message to anyone.  You should destroy this message and
kindly notify the sender by reply email.  Information contained in this
message that does not relate to the business of ITT is neither endorsed by
nor attributable to ITT. 
************************************ 


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: CLI output file names

Posted by Upayavira <uv...@upaya.co.uk>.
> 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: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org