{{indexmenu_n>1}} ====== Inclusion of Files ====== \\ Mobility apps created with XOne have two main files: //**appwizard.xml**// and //**mappings.xml**//, but, there are several ways to include files with calls, in such way that we can have external code to better control its creation. \\ \\ \\ The different ways to make a call to an external file are: \\ \\ ===== SCRIPT Files ===== \\ As we have already seen, it can be inserted xonescript code inside the actions to make our job. \\ But we do not have to insert directly that code inside the XML, but in many occasions is convenient to put it on an external file, in such way that only when such a code is called, it is parsed, so the app performance gets better. \\ \\ These files that have xonescript code, must have **VBS** extension. \\ \\ The realization of the inclusion of these files is as follows: \\ \\ ... As said before, instead of loading it at start in the companies collection, it can be loaded at the moment we are going to need it, for instance: ===== XML FILES ===== \\ On the other side, the machinery allows to have XML code into another files, with what we could have collections in external files. \\ \\ In order to be able to make these steps, it would be as follows: \\ \\ The **//mappings.xml//** file must exists and it is mandatory, and it is the main file to be searched, and this one will be the one that will later make the calls to the files with external collections. \\ For this, to a **coll** level the **ext-file** attribute is set, where this attribute allows to include complete collections from //xml// external files. \\ The value of the attribute defines the name and extension so that a definition of a collection is included from an external file. \\ \\ The **name** attrubute of the **//coll//** node where is defined, must match with the same attribute in the collection described in the file. \\ The external file must have a single node of collection, that is, only has to exist the coll node.\\ \\ In recent versions of the platform it is not necessary to specify the ext-file, if the collection doesn´t exist in the mappings, you should try to find an XML file with the same name of the collection, at the same folder where the mappings is in. \\ ===== CSS FILES ===== \\ The machinery allows to have declared CSS the definition of certain features of the nodes. To do this, it will be necessary to have external CSS file which have the code that we are going to use later. \\ \\ The call to this file it will be made inside the **app** node,and with the **style** node. Here, an example is shown: \\ \\