[AWS] embedding resorces into an AWS

Xabier Artola Zubillaga jiparzux@sc.ehu.es
Sat, 31 Jan 2004 05:27:21 +0100 (MET)


Dear colleagues,

we are working on the implementation of an electronic dictionary as a
browser-based application to be distributed on CD in a first version. We
are
using for that AWS because (1) it is based on Ada, (2) it offers a very
convenient way to separate server-side and client-side scripting (that is
good since we are planning for a future on-line version of the dictionary
too), and (3) it gives us a very convenient way also for the distribution
of
the product on CD. A prototype is already built and it works
satisfactorily.

We would like to distribute it as a single executable with all the
resources
embedded in it. Is it feasible and/or reasonable?

The resources are XML documents for the dictionary entries and indexes,
XSLT
scripts that are processed at the server, and then HTML pages, images, CSS
stylesheets, JavaScript function files and so on.

And, second question: although the resource tree has been built with
awsres
and embedded into the excutable, the prototype doesn't work fine if the
actual resource files are not present in the directory, because, in fact,
the programs have not been coded with this in mind. Is this correct or we
are
totally wrong? Which is the correct way to do it?

Does it mean that the Ada code must be different depending on whether you
want to embed the resources into the executable or not? Is there any way
to
get an XML tree (or an internal file) from a Strem_Element_Array, for
example?

Sorry for so many questions, but we are a bit confused. Thanks in advance.

Xabier Artola.
Univ. of the Basque Country.

PS. The next quotation is from the AWS 1.4 documentation, and I am afraid
it
is the source of our misunderstanding:
The resource tree must be linked with your executable, to do so you just
have to "with" the resource tree root into one of your program unit. This
will ensure that the resource tree will be compiled and linked into the
executable. AWS and Templates_Parser know about resource files and will
pick
them up if available.

Note that this is transparent to users. It is possible to build the very
same server based on standard files or resources files. The only change in
the code is to "with" or not the resource tree.