Description of filelist.xml

The root element of each filelist.xml is the <filelist> tag. So you can use this as a template:
<?xml version="1.0" encoding="us-ascii"?>
<!DOCTYPE fileList SYSTEM "filelist.dtd">
<fileList>
 
</fileList>

Between the opening and closing <filelist> tag there must be one or more <user> tags. The <filelist> tag has no attributes.

The <user> tag

A user tag represents a person who connects to the ftp server to edit some files. The idea is that different users get a different view of the files on the ftp server. E.g. a normal customer might get just a look at the snippets he can edit, with a conversion of html tags to ASCII.
A administrator or webmaster might get the full html source. Look at the examples to get an impression of this.

Parameters

Attribute Description Required
id The user id, which has to match the one entered in the "User ID" field in the client generator, when this user?s client is created.It must be unique for all user tags in one filelist. Yes
transform Specifies whether or not the snippets shall be transformed from html to ascii before shown to the user(and back when uploading).Defaults to "true".If set to "false", no transformation happens. No.
prefix Specifies a prefix to mark the editable parts. (All parts between the prefix and the postfix are editable).
Note:"<" and ">" have to be escaped by &lt; and &gt;. Defaults to "&lt;!--pre--&gt;"
(Note: There is a hidden trick you can do with this attribute: If you set the prefix to "", the normal search for pre- and postfix is bypassed. The client of this user will switch to "raw mode", and show the complete content of every file loaded. Transformation is disabled automatically. The file names are used as button labels. This provides a quick way for webmasters to access complete files on the server.
Note:Please dont't use this at the moment, it's buggy)
No.
postfix Specifies a postfix to mark the editable parts. (All parts between the prefix and the postfix are editable).
Note:"<" and ">" have to be escaped by &lt; and &gt;. Defaults to "&lt;!--post--&gt;"
No.
regex Specifies a regular expression. Files whose path matches the expression will be loaded and checked for editable parts by the client. This forces the client to look at all files on the ftp server, and might be slow if there are very many files. No.

Parameters specified as nested elements

The <htmlFile> tag

Each <user> tag can contain a arbitrary number of <htmlfile> tags. These represent files on the ftp server. (The name is a bit misleading, as it could be any type of (text)file.) This is the simplest way to tell the client which files it has to load and check for editable parts. This is the fastest way to define the files the client has to load, compared to the <dir> tag or the regex attribut, as it needs no searching.

Parameters

Attribute Description Required
path The path of the file on the ftp server. Yes.

The <dir> tag.

Each <user> tag can contain a arbitrary number of <dir> tags. Each specifies a directory on the ftp server. The client will load all text files in this directory and scan for editable parts. Text files are recognized by their ending. These ending are treated as text files:
".htm", ".html", ".hdml", ".txt", ".asc", ".rtx", ".xml", ".sgml", ".tsv", ".wml", ".wmls", ".css", ".js", ".java", ".htaccess"
If there are more directories in this one, there is no recursion.

Attribute Description Required
path The path of a directory on the ftp server which contains files to be loaded by the client. Yes.

The <message> tag.

Each <user> tag can contain zero or one <message> tags. This is for defining a welcome message which the client will display. The message tag has no attributes, the message is given between the opening and closing tag.

Examples

A filelist with one user which editing only one file:

<?xml version="1.0" encoding="us-ascii"?>
<!DOCTYPE fileList SYSTEM "filelist.dtd">
<fileList>
  <user id="susi">
    <htmlFile path="index.html" />
  </user>
</fileList>

A filelist with one user who edits three files, and gets a nice welcome message:

<?xml version="1.0" encoding="us-ascii"?>
<!DOCTYPE fileList SYSTEM "filelist.dtd">
<fileList>
  <user id="susi">
  <message>Hello stupid!</message>
    <htmlFile path="index.html" />
    <htmlFile path="anotherFile.html" />
    <htmlFile path="aFolder/fileInAFolder.html" />
  </user>
</fileList>

A filelist with one user loading all (text)files in the root directory:

<?xml version="1.0" encoding="us-ascii"?>
<!DOCTYPE fileList SYSTEM "filelist.dtd">
<fileList>
  <user id="susi">
    <dir path="" />
  </user>
</fileList>

A filelist with one user loading all (text)files in a different directory:

<?xml version="1.0" encoding="us-ascii"?>
<!DOCTYPE fileList SYSTEM "filelist.dtd">
<fileList>
  <user id="susi">
    <dir path="content/susi" />
  </user>
</fileList>

A similar thing done with a regular expression:A filelist with one user loading all .htm and .html files below a specified directory. The difference to the "dir" example is, that files in subdirectories of content/susi are included, and that only files with ending .htm and .html will be loaded.

<?xml version="1.0" encoding="us-ascii"?>
<!DOCTYPE fileList SYSTEM "filelist.dtd">
<fileList>
  <user id="susi" regex="content/susi/.*\.htm|content/susi/.*\.html">
  </user>
</fileList>

A filelist with two users. The second one will get the editable parts without transformation:

<?xml version="1.0" encoding="us-ascii"?>
<!DOCTYPE fileList SYSTEM "filelist.dtd">
<fileList>

  <user id="susi">
    <dir path="content/susi" />
  </user>
  
  <user id="admin" transform="false">
    <dir path="content/susi" />
  </user>
  
</fileList>

Another filelist with two users. The second one will get the whole files without transformation:

<?xml version="1.0" encoding="us-ascii"?>
<!DOCTYPE fileList SYSTEM "filelist.dtd">
<fileList>

  <user id="susi">
    <dir path="content/susi" />
  </user>
  
  <user id="admin" prefix="">
    <dir path="content/susi" />
  </user>
  
</fileList>

A filelist with two users, a message using html and elaborate comments.

<?xml version="1.0" encoding="us-ascii"?>
<!DOCTYPE fileList SYSTEM "filelist.dtd" >
<fileList>

    <user id="frank">
        <message>
            <!-- The welcome message text is shown using a JLabel. So you can use
                html in the message if it is prefixed by <html>. To prevent the html
                parts from being treated as xml markup, the whole sequence is
                surrounded by "<![CDATA[" and "]]>". -->
            <![CDATA[<html><h2>Hello Frank!</h2>Please edit the pieces of text below.]]>
        </message>
        <htmlFile path="test1.htm" />
        <htmlFile path="test2.htm" />
        <!-- Here you can add more html files -->
    </user>

    <!-- In the "user" tag you can define the user id and the pre- and postfix.
        Note how the "lesser than" and the "greater than" characters are escaped
        using &lt; and &gt; - otherwise they would be treated as xml markup.
        With the transform attribute( (yes | no) defaults to yes) you can adjust
        if the html shall be converted to ascii or left as is. So for a person
        with html knowledge it might be better to edit the html directly.-->

    <user
        id="admin"
        prefix="&lt;!--preadmin--&gt;"
        postfix="&lt;!--postadmin--&gt;"
        transform="false">
        <message>
            <![CDATA[<html>Hello Admin!]]>
        </message>
        <htmlFile path="test1.htm" />
        <htmlFile path="test2.htm" />
    </user>

    <!-- Here you can add more users -->
    <!-- By defining different pre- and postfixes you may allow different users
        to edit different parts of the documents. However, this might cause
        problems if they access the same file at the same time. -->
</fileList>