jso.xml Descriptor file

This section is about the XML descriptor file configuring JavaScript Optimizer - JSO.

Tags description

This descriptor file is really easy to configure.

Here is a simple overview of all the possibilities provided by this xml file:
<jso> <group name="group1" location="http://localhost:8085/"> <js>/jsfile.js</js> <js>/jsfile2.js</js> </group> <group name="group2"> <js>/jsfile3.js</js> <js>/jsfile4.js</js> <css>/cssfile1.css</css> <group-ref>group1</group-ref> </group> <group name="all-min" retention="true"> <group-ref>group2</group-ref> </group> <group name="all-complete" minimize="false"> <group-ref>group2</group-ref> </group> </jso> As you can see, a group is identified by a name and contains resources (that can be either js files, css files, or references to other groups).
These resources can be located at any place. The inheritable location attribute allow you to customize the resources location. In this example, the resources of "group1" are provided by an different server.
Note that if the group is set as minimized, and in a remote server, you will have to compress manually (JSOMain class) and set that compressed file at the remote location. The path for that file must be "LOCATION/jso/GROUP_NAME.js".
A group is minimized by default, but this feature can be disabled by setting the minimize attribute to false : the files won't be modified (just concatenated if exploded mode is set to false in the tag). Furthermore, this minimized attribute is recursive, it will be applied to all its nested resources. This can be really useful to set different configurations modes.

In the previous example, we can see that two identicals modes have been defined, except that one minimizes the resources and write the resulting file into the disk. A single modification of the group specified in the tag permit to switch from a commented bufferized JavaScript to a minimized written one.