| ||||
SummaryThe second level of configuration. | ||||
DescriptionApplication profiles (seeprofile) contain information
applicable to particular applications.
| ||||
NotesRoot element:app-profile
| ||||
See Also
|
| ||||
SummaryThe third level of configuration. | ||||
DescriptionThe directory meta-data (DMD.xml) may contain information specific to particular directories | ||||
NotesRoot element:dmdThis level is optional. | ||||
See Also
|
| ||||
SummaryThe first level of configuration. | ||||
DescriptionThe global configuration (conf/charlie.conf) contains information applicable to entire Charlie engine. | ||||
NotesRoot element:charlie
| ||||
See Also
|
| ||||
SummaryThe Charlie engine uses a cascading three-level configuration. The configuration holds key information on the request resolution (request-action mapping, data drivers) and thus contains a relevant part of the application logic. | ||||
DescriptionThere are three configuration levels:Global,
Application and Directory.
Some configuration items are allowed in all three levels, while some
other may be specific to particular level only.
| ||||
See Also
|
| ||||
SummaryRule expressions may be used in several configuration items, mostly named 'rule-*'. | ||||
DescriptionRule expressions are used when one request is translated to another. This happens when a data driver retrieves a real document as a response a to former Charlie request, when the engine resolves document using links etc.The rules say how to build a new request object from the original one. Each expression is a mix of literal characters and functions. Literals are copied unchanged (mostly a URI of the new request). Functions allows to reuse parts of the original request in the new one. You may use the following functions: $env(name): Returns the value of specified environment variable. $scheme: Extracts the scheme part of the original URI. $host: Extracts the host part of the original URI. $path([from, to]): Extracts the path part of the original URI. If the parameters are given, the original path is split and only elements from 'from' to 'to' are returned. If the parameters are negative numbers, the path elements are indexed from the end to the beginning (e.g. $path(-1, -1) is the last element, probably the filename). $query: Extracts the query part of the original URI. $qfi(index): Extracts the i-th query field name of the original URI. $qvi(index): Extracts the i-th query value of the original URI. $qv(name): Extracts the value of original query field named 'name'. $fragment: Extracts the fragment part of the original URI. $ds: Returns the dollar sing ("$").
| ||||
Exampleoriginal request URI: charlie:/my.application/file/location/foo.xml?a=b&c=d with the expression of http://my.server.org/another/root/$path(3,-1)?renamed_a=$qv(a) results to: http://my.server.org/another/root/file/location/foo/xml?renamed_a=b | ||||
See Also
|
| |||||||||
SummaryDefines action URL for one or more files. | |||||||||
Syntax<action match="regexp">action-uri</action>
| |||||||||
DescriptionLevel:Global, Application, DirectoryParent: Children: n/a | |||||||||
NotesSeeactions for an example.
| |||||||||
See Also
|
| |||||||||
SummaryDefines action policy for one or more files. | |||||||||
Syntax<action-policy match="regexp">rule</action-policy>
| |||||||||
DescriptionLevel:Global, Application, DirectoryParent: Children: n/a | |||||||||
NotesSeepolicies for an example.
| |||||||||
See Also
|
| ||||||
SummaryAn action URL (relative to the processed request) may be specified using this element. | ||||||
Syntax<action-url>action-url</action-url>
| ||||||
DescriptionLevel:DirectoryParent: Children: n/a | ||||||
See Also
|
| ||||
SummarySpecifies action URLs for incoming 'charlie:' URLs with the action policy resolved to 'action'. Seepolicies
for details.
| ||||
Syntax<actions> | ||||
DescriptionLevel:Global, Application, DirectoryParent: Children: | ||||
Example<actions> <action match='^charlie:/my_app/dir1'>charlie:/my_app/act1.act</action> <action match='^charlie:/my_app/dir2'>charlie:/my_app/act2.act</action> </actions> | ||||
See Also
|
| ||||
SummaryThe root element forApplication level configuration.
| ||||
DescriptionChildren:javascript, data-drivers,
policies, actions
| ||||
See Also
|
| ||||||
SummaryDefines one Charlie application. | ||||||
Syntax<application name="name">
| ||||||
DescriptionLevel:GlobalParent: Children: | ||||||
NotesSeeapplications for an example.
| ||||||
See Also
|
| ||||
SummaryDefines Charlie applications. | ||||
Syntax<applications> | ||||
DescriptionLevel:GlobalParent: Children: | ||||
Example<applications> <application name='my_app'> <profile>charlie:/profiles/my_app.xml</profile> </application> <application name='demo'> <profile>charlie:/profiles/demo.xml</profile> </application> </applications> | ||||
See Also
|
| ||||
SummaryThe root element forGlobal level configuration.
| ||||
DescriptionChildren:javascript, mime-types,
log, data-drivers, applications,
policies, actions
| ||||
See Also
|
| ||||
SummarySpecifies data drivers to be used. | ||||
Syntax<data-drivers> | ||||
DescriptionLevel:Global, ApplicationParent: Children: | ||||
Example<data-drivers> <driver dir='charlie:/my_app/local/' subdirs='yes'> <type>FILE</type> <rule-uri>file:/usr/local/my_application/xml/$path(3,-1)</rule-uri> </driver> <driver dir='charlie:/my_app/remote/' subdirs='yes'> <type>HTTP</type> <rule-uri>http://www.remote.org/$path(2,-1)?$query</rule-uri> </driver> </data-drivers> | ||||
See Also
|
| ||||
SummarySpecifies the directory for JavaScript include lookup. | ||||
Syntax<dir>$MY_LIB/js</dir> | ||||
DescriptionThis element specifies a directory to be searched for JS libraries. The directory specification may contain the environment reference like '$MYLIB'.
The
Level: Parent: Children: n/a | ||||
NotesSeejavascript for an example.
| ||||
See Also
|
| ||||
SummaryThe root element forDirectory level configuration.
| ||||
DescriptionChildren:policies, actions,
files, links
| ||||
See Also
|
| ||||||||||||
SummaryDefines a data driver for a set of Charlie URLs. | ||||||||||||
Syntax<driver dir="dir" [default="yes|no"] [subdirs="yes|no"]>
| ||||||||||||
DescriptionLevel:Global, ApplicationParent: Children: | ||||||||||||
NotesSeedata-drivers for an example.
| ||||||||||||
See Also
|
| ||||
SummaryFor some data drivers, thedriver element can contain
driver specific elements.
| ||||
DescriptionLevel:Global, ApplicationParent:
SOAP: | ||||
Example<x-uri-scheme>urn</x-uri-scheme> <x-proxy>http://host:8080/soap/servlet/rpcrouter</x-proxy> <x-inner>inner_id</x-inner> | ||||
See Also
|
| |||||||||
SummaryDefines a content type for given file extension. | |||||||||
Syntax<extension name='extension' ct='mime-type'/>
| |||||||||
DescriptionLevel:GlobalParent: Children: n/a | |||||||||
NotesSeemime-types for an example.
| |||||||||
See Also
|
| ||||||||||||||||||
SummaryDescribes the file given in the 'name' attribute. While resolving a file, a default link item is always created. | ||||||||||||||||||
Syntax<file name="filename" [link-index="number"] [primary="yes|no"] [store="yes|no"] [action-policy="action|both|direct"]>
| ||||||||||||||||||
DescriptionLevel:DirectoryParent: Children: | ||||||||||||||||||
NotesSeefiles for an example.
| ||||||||||||||||||
See Also
|
| ||||
SummaryDefines a resolution policy for files from the charlie namespace. | ||||
Syntax<files> | ||||
DescriptionLevel:DirectoryParent: Children: | ||||
Example<files> <file name='data.xml' store='yes' link-index='2'> <link index='1' store='no' primary='no'> <rule-uri>../services/script.pl?$query</rule-uri> </link> </file> </files> | ||||
See Also
|
| ||||
SummaryOptions to include JavaScript libraries. | ||||
Syntax<includes> | ||||
DescriptionLevel:Global, ApplicationParent: | ||||
NotesSeejavascript for an example.
| ||||
See Also
|
| ||||
SummaryDescribes how to handle libraries passed to the engine JavaScript context. | ||||
Syntax<javascript> | ||||
DescriptionLevel:Global, ApplicationParent: | ||||
Example<javascript> <includes> <dir>$MY_LIB/js</dir> <preload>ch-doc-std.js</preload> <preload>form.js</preload> </includes> <modules> <perl-lib>$MY_LIB/perl</perl-lib> <module lang='perl' name='XMLDirectory'/> </modules> </javascript> | ||||
See Also
|
| ||||||
SummaryDefines the log level. The available values are: 'debug' (maximal information), 'info', 'warn', 'error' and 'critical' (minimal information). | ||||||
Syntax<level>level</level>
| ||||||
DescriptionLevel:GlobalParent: Children: n/a | ||||||
NotesSeelog for an example.
| ||||||
See Also
|
| |||||||||||||||
SummaryDefines a link for a file. | |||||||||||||||
Syntax<link match="regexp"* [primary="yes|no"] [index="number"] [store="yes|no"]>
| |||||||||||||||
DescriptionLevel:DirectoryChildren: | |||||||||||||||
NotesSeefiles and links for examples.
| |||||||||||||||
See Also
|
| ||||
SummaryDefines links for files from the charlie namespace. | ||||
Syntax<links> | ||||
DescriptionLevel:DirectoryParent: Children: | ||||
Example<links> <link match="^charlie:/my_app/dynamic/.*" index='1' store='no' primary='no'> <rule-uri>../services/script.pl?$query</rule-uri> </link> </links> | ||||
See Also
|
| ||||
SummarySpecifies log options. | ||||
Syntax<log> | ||||
DescriptionLevel:GlobalParent: Children: | ||||
Example<log> <level>debug</level> </log> | ||||
See Also
|
| ||||||
SummaryThis section describes MIME types. It is used by data drivers giving a direct response. | ||||||
Syntax<mime-types [default='mime-type']>
| ||||||
DescriptionLevel:GlobalParent: Children: | ||||||
Example<mime-types default='text/plain'> <extension name='jpg' ct='image/jpeg'/> <extension name='gif' ct='image/gif'/> <extension name='htm' ct='text/html'/> <extension name='html' ct='text/html'/> </mime-types> | ||||||
See Also
|
| |||||||||
SummarySpecifies a module to be loaded. | |||||||||
Syntax<module lang="lang" name="module-name"/>
| |||||||||
DescriptionLoads the specified module of given language. The only supported language is Perl so far.
Level: Parent: Children: n/a | |||||||||
NotesSeejavascript for an example.
| |||||||||
See Also
|
| ||||
SummaryModule options. This item makes it possible to plug external modules in. | ||||
Syntax<modules> | ||||
DescriptionLevel:Global, ApplicationParent: | ||||
NotesSeejavascript for an example.
| ||||
See Also
|
| ||||
SummarySpecifies where to look for Perl modules. | ||||
Syntax<perl-lib>$MY_LIB/perl</perl-lib> | ||||
DescriptionWhen Perl modules are loaded, all directories listed inperl-lib elements are prepended to the standard Perl
include path.
Level: Parent: Children: n/a | ||||
NotesSeejavascript for an example.
| ||||
See Also
|
| ||||
SummarySpecifies action policy for sets of 'charlie:' URLs. | ||||
Syntax<policies> | ||||
DescriptionLevel:Global, Application, DirectoryParent: Children: | ||||
Example<policies> <action-policy match='^charlie:/my_app/.*DMD\.xml$'>direct</action-policy> <action-policy match='^charlie:/my_app/\wview.*/'>action</action-policy> </policies> | ||||
See Also
|
| ||||
SummarySpecifies JavaScript files to be preloaded (included) for each action. | ||||
Syntax<preload>my-lib.js</preload> | ||||
DescriptionFiles specified in thepreload element are searched in
directories listed in dir elements. If no file is found,
an error occurs. Files form dir can be also included
using the include(); function in actions.
The files listed in
Level: Parent: Children: n/a | ||||
NotesSeejavascript for an example.
| ||||
See Also
|
| ||||||
SummaryURI of the application profile (in the 'charlie' scheme). If no file name is given, 'profile.xml' is supposed. | ||||||
Syntax<profile>uri</profile>
| ||||||
DescriptionLevel:GlobalParent: Children: n/a | ||||||
NotesSeeapplications for an example.
| ||||||
See Also
|
| ||||||
SummaryTranslation rule for uri part of request. SeeRule Expressions for more details.
| ||||||
Syntax<rule-uri>rule-expression</rule-uri>
| ||||||
DescriptionLevel:Global, Application, DirectoryChildren: n/a | ||||||
NotesSeedata-drivers, files, links for examples.
| ||||||
See Also
|
| ||||||
SummaryType of data driver. | ||||||
Syntax<type>type</type>
| ||||||
DescriptionLevel:Global, ApplicationParent: Children: n/a | ||||||
NotesSeedata-drivers for an example.
| ||||||
See Also
|