OFSET - Organization for Free Software in Education and Teaching
Project Zone
Project Home Page |  Download |  CVS |  Change Log |  To Do List |  FAQ |  Documentation |  Mailing List |  Pyassetml |  Libassetml ]



Copyright 2003 Bruno Coudoin, Stas Z.
Authors: Bruno Coudoin, Stas Z.

What is AssetML ?

AssetML defines an xml file that let application developper to use it as a resource database.
The idea is to be have a way to search content on your hard drive with metadata (like name, category, file type, description) instead of just a file name. This way, users can browse content more easily and developpers can share content more easily.

AssetML can be used to provide stock images, sounds or video and let any application benefit from it.
For example in the education area, we always need voices for letters, numbers, icons and so on. Instead of having each application developpers provide its own, he could create a package with an assetml description file and let others use it.
Another example is to use it to package free musics in the usual distribution form (like rpm). This way, audio players and games could let you browse and select a background music easily.
Last is for stock images, like with music, we can now install them and let the user select a background or an image for a document by searching through the assetml database.

Be aware that this is a very young project and that the tools and formats used here may be changed or altered.
For more information please contact the mailinglist.

XML File format

Here is basically a description of the xml file

 <AssetML dataset="numbers-en" rootdir="../numbers-en/" locale="en">
  <Asset file="1.ogg" mimetype="audio/x-ogg">
   <Description>The number One</Description>
   <Credits>Who did the audio / Licence info</Credits>
   <Categories>number;math;algebra</Categories>
  </Asset>
 </AssetML>

I18N issues

The Description tag can be used to provide translations, the AssetML creator tool can be used to add these strings in a .po file.
The big advantage is that translators uses regular .po files.

After xml-i18n parsing we would end up with:

 <AssetML dataset="gcompris numbers" rootdir="../gcompris/boards/numbers/"\
    locale="en">
  <Asset file="1.ogg" mimetype="audio/x-ogg">
   <Description>The number One</Description>
   <Description xml:lang="fr">Numero Un</Description>
   <Credits>Who did the audio / Licence info</Credits>
   <Categories>number;math;algebra</Categories>
  </Asset>
 </AssetML>

File extension and Location

To easily find assetml file, they must have the extension .assetml and be located in $prefix/share/assetml
The images, audio and video themselves can be placed anywhere and they will be found by merging the attribute rootdir of AssetML and the file attribute.
This way, the packager can organise its asset files the way he/she wants within the archive.

Packaging issues

Of course, only one resource (image, audio or video) is mandatory to define an asset.
To avoid the creation of huge resource files, you can create separate packages with several .assetml files.
In order for anybody to find them, you must put them in the predefined directory /usr/share/assetml and from here, any app can parse the xml files and filter in them searching for a specific info. Here, the categories field could be used to display car or tree for example.

One still could of course create a package dependancy to the resources package if they are mandatory for its app to work.

Tools and utilities

There are currently two implementations of AssetML utilities,
A C tool called libassetml and Python tools and modules.
For a description of the libassetml api see Libassetml
The rest of the tools and utilities are Python scripts and modules and can be found at Pyassetml


Schoolforge member logo
Hosted by
SourceForge Logo Project Ofset

Updated on 2004/05/19 at 05:16:41 - UTC
Copyright 2000,2001,2002,2003,2004 OFSET, Mont-de-Marsan, Landes, Europe
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.