Mapix CMS Documentation

1. What is mapix ?

Mapix is a framework and a CMS (also called CMF) written in PHP, under the GPL license (see COPYING for the license terms) It's designed to develop websites entirely (as far as possible) with the XML/XSL technology. Mapix framework is a gateway between the HTTP server and XML services. Mapix CMS is lightweight, multisite, localized, unobstrusive and modular (packages).

2. How does mapix works ?

2.1. Mapix framework :

Mapix core (framework) consists in one main PHP class that parses one or many XML "map" files (usually These XML documents contain "special" tags that define the structure your website(s). When a URL is called on your website, Mapix first find the nearer map file from the current URL. For example, when http://localhost/admin/login is requested, /admin/ will be loaded and Mapix will search a page named "login". Now if the admin dir dosn't exist, Mapix will try to load the / (from the document root), and try to find a page named "admin" that will contain a page named "login".

Once Mapix has loaded the map file and found the requested page, then, Mapix parses and process the template, content and any other nodes found in the page node. The result of this transform is a XML document that can be static (a XML file), or generated after one or many XSL transformation or dynamically generated by a server script (such as PHP).

Mapix core (framework) acts as a controller, that process XML content, HTTP services and XSL templates.

2.2. Mapix CMS :

Mapix CMS is a set of optional packages that can be installed over Mapix core to develop websites faster :

  • The common package contains shared resources and basic CMS features (localization, cache, content...)
  • The admin site allows website edition without using FTP
  • The demo site is an example of a site you can develop using Mapix CMS

More packages are available using the admin site package manager.

3. What tags can be used in map files ?

The default map file is (this can be modified in the /.core/config.php file) The mapix.xsd file describe the structure of the map file. (see /common/schemas/mapix.xsd) Here are the 8 tags that can be used in the map file :

3.1. The mapix tag :

This is the document (root) node of the mapix XML file. The "xmlns:xsi" attribute to indicate de XML Schema Instance namespace. The "xsi:noNamespaceSchemaLocation" attribute that points to the mapix schema file. The mapix node can contain any page, template, content, input or header nodes.

3.2. The include tag :

This tag is used to load submaps in a map file. It contains a "url" attribute an can be located in any node.

3.3. The page tag :

This tag is used to map a website URL to a content/transform tree. It contains one "url" attribute and must wrap at least one of these tags : include, page, template, content, input, header. The "url" attribute must not contain any "/" (slashes). If you want to create a "sub-page", just create a child page node. The "url" attribute can be a regular expression matching the POSIX syntax, for example : - url=".*" means "any url" - url="[0-9]+" means at least one numeric character Substring extracted from the regular expression can be used in the page with an input node of type "page" :

<input type="page" name="$1"/>
would return the first substring from the page url regular expression.

3.4. The template tag :

This tag is used in a page node as a part of the XSL transform process. (many templates can be wrapped together or put side by side) XSL files can be used for presentation (XHTML generating) or application purposes (model processing on XML data) This tag contains one "url" attribute. It must wrap at least one of these tags : include, page, template, content and/or input

3.5. The content tag :

This tag is generally used in a template node, as a static or dynamic XML content provider. Its contains one attribute "url". The optional attribute "method" indicates which HTTP method to use (default is "get"). This tag can only contain output tags. Many content tags can be grouped in a template or a page node.

3.6. The input tag :

This tag can be used in a template node for mapix to get any environnement variable from the HTTP server. In the Mapix PHP version, the input tag uses the superglobal collection $GLOBALS. This tag requires the attribute "type" to determine which collection should be accessed (ex : get,post,server,page,etc.). It also requires the attribute "name", with the variable name in that collection (ex : REQUEST_URI in the collection server, see for more) During transformation, the input value is XML Serialized and append to this tag. (see /include/serializer.test.php for examples of XML Serialize/Unserialize)

3.7. The output tag :

This tag is used in a content node to transform any XML data into a HTTP field. (first XML Unserialized then URL Serialized) It requires one attribute "name" to indicate the output variable name. The attribute serialize is optional, when set to false this will prevent an XML output from being serialized as an array This tag can contain many include, template, content or input tags.

3.8. The header tag :

This tag is used in a page node to add fields in the HTTP response header (location, content-type, ...) It contains only one attribute name and can contain many include, template, content or input tags. In the PHP version, the header tag is equivalent to the header function call : header("name:value");

4. Where can i meet the mapix community ?

Mapix official website is on A demo site is available on Mapix is generously hosted by, you can use the tracker or the forum at Mapix is created and maintained by a small french company IRCF : Other IRCF Open source projects can be found on You can contact mapix author at