[XML Center]
[GA Home]
Charlie FAQ
Petr Cimprich
July 20, 2000
Q:
Why Charlie?
A:
Would you like to have an open architecture allowing distributing data
from any sources to any clients? Would you like this system to be based
on industry standards with no proprietary features? Would you like all
this to be available for free with source code? So do we. Charlie is an
attempt to meet such a need.
(Q&A by )
Q:
What license is Charlie released under?
A:
Charlie contains several third-party components: Expat is
released under the
Mozilla Public License 1.1
or the GNU
General Public License
alternatively). Java-Script and the JS perl package are
also under the MPL 1.1 (or the GPL alternatively).
The rest of Charlie code has been created by the Ginger Alliance and
includes Sablotron and Charlie perl packages. These components
are also subject to the MPL/GPL to keep the licensing policy consistent.
(Q&A by )
Q:
Does Charlie contain any third-party code?
A:
Yes, Charlie contains two third-party components.
-
An important part of Charlie is Sablotron, which contains James
Clark's expat XML parser. Expat is subject to the Mozilla
Public License or the GNU General Public License alternatively.
-
Charlie uses the Mozilla JavaScript engine, which is subject
to the Mozilla Public License.
Charlie distribution includes complete sources of the above mentioned
components.
(Q&A by )
Q:
What platforms can Charlie run under?
A:
Currently, we run Charlie on Linux and Solaris. It is designed to run
on Windows as well but we are too focused on its functionality to
experiment with other platforms now. Basically, Charlie should run under
each platform supporting C/C++ and perl.
(Q&A by )
Q:
Does Charlie requires any other software?
A:
Yes, it does. Current Charlie implementation contains no http server,
so that it must be installed before Charlie can run. Charlie uses its
cgi (or mod_perl) interface. The http server configuration has to
include some Charlie stuff; see Charlie INSTALL file for more details.
We have tested only Apache (1.3.9) and mod_perl (1.21) so far but any
http server should work.
Charlie also requires perl and some perl modules to be installed. We try
to keep the number of external modules as small as possible; the
complete list will be published within the Charlie documentation.
(Q&A by )
Q:
How does Charlie work?
A:
If you want Charlie to do something (well, the only thing Charlie can
do is to give you an XML document), you have to pass it a URL. Each URL
points (explicitly or implicitly) to a so-called action. The action
describes how to create the XML document to be returned. The common way
would be to get an XSLT template and source XML data, transform the
source according the template and return the result. Each input can be
either local file, remote file downloaded via http, or output from any
local/remote program. The output of the action depends on the XSLT
template, which should depend on the client who is running the action.
You may wish your data in HTML, WML or other DTD.
Charlie is a layer between the client and the server/data provider.
You can think of it as a kind of proxy if you wish. It can be located
on the same machine as the client, on its own machine, or by the server.
Each of these possibilities makes sense. You can employ Charlie as a
local cache that is able to work off-line (to some extent), as a LAN
proxy, or as a server XML interface.
(Q&A by )
Q:
Is it difficult to write down an action?
A:
No, it is not. The language for writing actions is JavaScript.
Though you can employ all features of this language, a common action
uses only few Charlie specific objects and methods. A simple action can
for example look like this:
// getting XSLT template
templ = charlie.getDocument(xsl_template_url);
// geting XML data
data = charlie.getDocument(xml_data_url);
// processing template and data
ret = processXSLTStrings(templ,data);
// creating body of response
response.document(ret);
// creating http header of response
response.contentType("text/html");
// return code
1;
The six-line action is able to provide the data, process them and send
them back to a client using the http protocol. On the other hand,
JavaScript is a full-featured programming language, which provides you
with all you need. Charlie action allows you to do simple things simply
and complicated things the way you want.
(Q&A by )
Q:
Can I employ Charlie to present my XML data on the Web?
A:
Sure. Although Charlie can offer much more, you can use it to transform
any existing XML data to HTML. All you need is to install Charlie, write
down a few simple actions and create XSLT templates.
(Q&A by )
(c) 2000, 2001 Ginger Alliance