Content Structuration and Metadata Management in XWiki

Apr 08 2011

This post deals with content structuration / metadata management in XWiki

A common need were working on documentation and collaboration related matters is data enrichment. Being able to centralize information like wikis do is great. Being able to use additionnal information in order to describe and better organize, find that information via the use of metadatas is even better. In this post we will have a look at how XWiki fulfills this objective.

Explaining the concept of "Data description" using metadatas

You may be asking yourself "What does describing datas mean?". To explain a concept, nothing's better than a real life example: When classifying your administrative papers you do not put them in the hallway of your appartment... You probably use a metal box in which you have several files with a label on each of them. Each label matching a category. One for Health, one for Insurance, Work, Taxes, etc. When you classify you latest payroll in that metal box, you describe that sheet of paper as corresponding to the category "Work". "payroll" data is described by "Work". We could use other labels inside those files for years. Therefore each paper filed in the box would be described by:

  • A category (Health, Work, Insurance, Taxes, ...)
  • A Year (2008, 2009, 2010, 2011, ...)

    Each of those are called "metadata". The page and the way it is described is called "content structuration". We can use the concept to describe any type of data. As an example, a type "Event" could be described by:

  • a title
  • a description
  • a location
  • a date
  • an organizer (person)
  • ...

    Here at XWiki, we participate every year in "salon intranet et travail collaboratif" conference. This year we developed a small application allowing us to keep track of all people coming to see us on the stand. The application is located inside our current intranet. Each "Prospect" have following metadatas:

  • First name and last name (text)
  • contact information (text)
  • whether he/she wishes us to get back to her (yes/no)
  • a description of the collaboration need (text)
  • when the project is supposed to be launched (date)
  • number of persons involved in the project (number)

    Create, Update, List and View your Structured Datas with XWiki

    Describe Datas to be Created/Managed

    XWiki allows you to create all type of structured data. A wizard assists you during the structured data description process. This wizard is located at page XWikiClasses of space XWiki. It allows you to describe the "model" to be used to manage your new type of data. This "model" is called a class. Developers are familiar with that concept. Once the class is created, you can add all kind of property: text, rich text (WYSIWYG), date, user, number, list, etc. Here is how the page allowing us to create "Propect" class looks like:


Create and Edit your Datas

Now that your data structure has been defined, you can create your datas. For each property defined, XWiki will display the appropriate web form. In our example, here is how the form will look like:


Display your Datas

We have seen how to define our data structure, create and update our data. The only remaining task is to display our datas. XWiki features a powerful livetable component allowing you to display a given type of datas in the wiki. This feature is particularly appreciated by our clients because it is very user friendly, it is similar to the excel filtering feature and allows you to find a page very quickly. See how it looks like when configured to display our "Propect" class.

Affichage-donnees-tableau-dynamique-livetable-2.jpgThe livetable allows to filter each column. Finding people wishing that we get back to them, or looking for "Christophe" prospect is straight forward! Several filters can be combined together. If many datas are supposed to be displayed by the livetable, a pagination system allows you to browse throught the result pages.

For some of our clients, we even set-up a "livetable excel export" feature. With or without filtering, our client can export the content of the livetable in excel format simply by clicking on a button! It allows to use the exported file to create dashboards, inject it in another system or simply annotate it and share it with colleagues and partners.

To Go Further: FAQ Example

Hands on! If you wish to go further and put into practice this powerful XWiki feature, a very well tutorial has been written by the community and is available at:

And since XWiki is also a development platform, you can think of any extension or additionnal feature in order to adapt it to your special needs!

Don't hesitate to contact Guillaume who will be happy to answer you questions on XWiki : / +33(0)1-45-42-40-90