Webtogether File Structure


The structure of the directories and the files depends on the purpose you are going to use it for. The meaning of the structure is different if used as input for the forum xslt and diferent for Blog etc.

The DataSource lists all files but the hidden ones. That means the files/directories starting with a dot do not appear in the xml output. So you can use directories starting with a dot to store additionall (meta)data. One example is the .thumbs directory for the photo gallery to store thumbnails.

The .metadata directory has a special meaning. For each file in the directory XYZ there is a namesake in the directory XYZ/.metadata Depending on the attributes of this namesake the action is executed to retrieve the metada.

  • If the namesake has the execute attribute set then it is executed and the output produced is inserted as metadata
  • If the namesake is not executable but it is readable the content of it is inserted as metadata


This filesystem structure is mapped onto a XML representation. There are default attributes which are always transmitted and additionnaly there are some metadata. The metadata are purely optional and may or may not be evaluated by xslt transformation. In principle even the default attributes which are always transmitted wouldn't be needed. You could return only metadata based on your choice/need. But since this structure developed from the filebrowser/index example it is as it is. The structure is apparent from the DataSource description. A more detailed explanation of the attributes is here (in form of a DTD).

<!DOCTYPE list [
  <!ELEMENT list (e*)>
  <!ATTLIST list s (p|i|u|g|s|t|n) "n">
  <!ATTLIST list o (ascending|descending) "ascending">
  <!ATTLIST list t (text|number) "text">
  <!ATTLIST list l CDATA "en-US">
  <!ATTLIST list e CDATA "0">
  <!ATTLIST list a CDATA "0">
  <!ELEMENT e (y,p,i,u,g,s,t,n,l,m?)>
] >
  • list is the root element, the name says it all, it can contain any number of e elements
  • d means directory and is a valid *NIX path
  • s sort column, the name of the column upon which the sort should be done
  • o sort order, ascending or descending
  • t type of the xslt sort, number or text
  • l language in the ISO defined form (pick one)
  • e offset to start from
  • a ammount of elements delivered
  • e element, must have one occurence of y,p,i,u,g,s,t,n,l in the given order and can have one or none m element.
  • y directory, file or link flag. (-, d, l)
  • p permissions
  • i subdirectories
  • u user/owner
  • g group
  • s size
  • t time (last modification time)
  • n name (basename)
  • l link (full path+name)

As you can see this structure copies simply the output of the "ls -l" command. Nothing more, nothing less. Below you can see a small example of a xml datafile for the forum.

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="post.xsl" ?>
<list d="/volume1/public/debian/chroottarget/var/www/forum/test.mine.nu/forum1/topic1/"
            <label>FluxBB 1.3 Beta 3 Postponed</label><author>Smartys</author>
            <title>Topic: FluxBB 1.3 Beta 3 Postponed</title>
            <post>As those of you who have been following FluxBB's development progress have seen, we have unfortunately not been able to make our deadline for the Beta 3 release. Real life has caught up to all the members of the development team in various unexpected ways, which has led to final work not being committed to the repository. We are very sorry that we have been unable to meet the deadline we promised.Many of the features that we planned for the beta have been committed to the repository, but some of the most significant, including the markup revisions, have not yet been completed. Rather than releasing Beta 3 now, without those features, we have decided to take a different approach. At the request of many users, we will not be releasing Beta 3 at this point. Instead, we will be linking users to our SVN repository to download and play with all of the features we have at this point. When we are finished, we will release Beta 3 with all the fanfare it deserves. You can download the current revision using this linkEdit: An issue with the database schema in the link above has been discovered. The issue affects searching and special characters. Anyone who has installed/who will install a NEW copy of 1.3 using it should be sure to download db_update.php and run it. Upgrades from the previous beta or from 1.2 are not affected.Last edited by Smartys (2008-06-05 14:24:49)</post>
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.