]> git.mxchange.org Git - mailer.git/blobdiff - inc/callback-functions.php
Code style changed, ext-user continued:
[mailer.git] / inc / callback-functions.php
index 0d7456a6983215d735040fbb23a7f20bbfcf76c4..4b9c5c8b59d3e47075661a435bab603662f1215e 100644 (file)
@@ -16,8 +16,8 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
@@ -45,7 +45,16 @@ function doXmlAdminEntryMetaData ($resource, $attributes) {
        // There should be no attributes
        if (count($attributes) > 0) {
                // Please don't add any attributes to foo-list nodes
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
+       } // END - if
+}
+
+// Handles the XML node 'member-entry-meta-data'
+function doXmlMemberEntryMetaData ($resource, $attributes) {
+       // There should be no attributes
+       if (count($attributes) > 0) {
+               // Please don't add any attributes to foo-list nodes
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
        } // END - if
 }
 
@@ -54,25 +63,26 @@ function doXmlCallbackFunction ($resource, $attributes) {
        // There are two attributes, by default
        if (count($attributes) != 2) {
                // Not the right count
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 2 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 2 attributes, got ' . count($attributes));
        } elseif (!isset($attributes['TYPE'])) {
                // 'TYPE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
        } elseif (!isInvalidXmlType($attributes['TYPE'])) {
                // No valid type
-               debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
        } elseif (!isset($attributes['VALUE'])) {
                // 'VALUE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
        } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
                // Not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
        }
 
        // Add the function name and no attributes by default
        $GLOBALS['__XML_CALLBACKS']['callbacks'][] = __FUNCTION__;
        $GLOBALS['__XML_CALLBACKS']['functions'][__FUNCTION__][] = $attributes['VALUE'];
        $GLOBALS['__XML_ARGUMENTS'][__FUNCTION__] = array();
+       $GLOBALS['__COLUMN_INDEX'][__FUNCTION__] = 'column';
 }
 
 // Handles the XML node 'database-table'
@@ -80,30 +90,29 @@ function doXmlDatabaseTable ($resource, $attributes) {
        // There are three attributes, by default
        if (count($attributes) != 3) {
                // Not the right count
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
        } elseif (!isset($attributes['NAME'])) {
                // 'NAME' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
        } elseif (!isset($attributes['TYPE'])) {
                // 'TYPE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
        } elseif (!isInvalidXmlType($attributes['TYPE'])) {
                // No valid type
-               debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
        } elseif (!isset($attributes['VALUE'])) {
                // 'VALUE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
        } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
                // Not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
        }
 
        // Add the entry to the list
        addXmlValueToCallbackAttributes('database_table', $attributes);
-       //$GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['database_table'] = $attributes['VALUE'];
 }
 
 // Handles the XML node 'database-column-list'
@@ -111,7 +120,7 @@ function doXmlDatabaseColumnList ($resource, $attributes) {
        // There should be no attributes
        if (count($attributes) > 0) {
                // Please don't add any attributes to foo-list nodes
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
        } // END - if
 
        // Add an empty list
@@ -121,27 +130,39 @@ function doXmlDatabaseColumnList ($resource, $attributes) {
 // Handles the XML node 'database-column-list-entry'
 function doXmlDatabaseColumnListEntry ($resource, $attributes) {
        // There are three attributes, by default
-       if (count($attributes) != 3) {
+       if (count($attributes) != 6) {
                // Not the right count
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 6 attributes, got ' . count($attributes));
        } elseif (!isset($attributes['NAME'])) {
                // 'NAME' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
        } elseif (!isset($attributes['TYPE'])) {
                // 'TYPE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
        } elseif (!isInvalidXmlType($attributes['TYPE'])) {
                // No valid type
-               debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
-       } elseif (!isset($attributes['VALUE'])) {
-               // 'VALUE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
-       } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+       } elseif (!isset($attributes['TABLE'])) {
+               // 'TABLE' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TABLE not found.');
+       } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['TABLE'])) {
                // Not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute TABLE does not validate. TYPE=' . $attributes['TYPE'] . ',TABLE=' . $attributes['TABLE']);
+       } elseif (!isset($attributes['ALIAS'])) {
+               // 'ALIAS' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute ALIAS not found.');
+       } elseif (!isset($attributes['FUNCTION'])) {
+               // 'FUNCTION' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute FUNCTION not found.');
+       } elseif ((trim($attributes['ALIAS']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['ALIAS']))) {
+               // 'ALIAS' not valid/verifyable
+               reportBug(__FUNCTION__, __LINE__, 'Attribute ALIAS does not validate. ALIAS=' . $attributes['ALIAS']);
+       } elseif ((trim($attributes['FUNCTION']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['FUNCTION']))) {
+               // 'FUNCTION' not valid/verifyable
+               reportBug(__FUNCTION__, __LINE__, 'Attribute FUNCTION does not validate. FUNCTION=' . $attributes['FUNCTION']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_list'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/database-column-list not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/database-column-list not included around this node. Please fix your XML.');
        }
 
        // Add the entry to the list
@@ -153,7 +174,7 @@ function doXmlCallbackFunctionList ($resource, $attributes) {
        // There should be no attributes
        if (count($attributes) > 0) {
                // Please don't add any attributes to foo-list nodes
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
        } // END - if
 
        // Add an empty list
@@ -165,25 +186,25 @@ function doXmlCallbackFunctionListEntry ($resource, $attributes) {
        // There are three attributes, by default
        if (count($attributes) != 3) {
                // Not the right count
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
        } elseif (!isset($attributes['NAME'])) {
                // 'NAME' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
        } elseif (!isset($attributes['TYPE'])) {
                // 'TYPE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
        } elseif (!isInvalidXmlType($attributes['TYPE'])) {
                // No valid type
-               debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
        } elseif (!isset($attributes['VALUE'])) {
                // 'VALUE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
        } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
                // Not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['callback_list'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/callback-function-list not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/callback-function-list not included around this node. Please fix your XML.');
        }
 
        // Add the entry to the list
@@ -195,7 +216,7 @@ function doXmlExtraParameterList ($resource, $attributes) {
        // There should be no attributes
        if (count($attributes) > 0) {
                // Please don't add any attributes to foo-list nodes
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
        } // END - if
 
        // Add an empty list
@@ -207,40 +228,94 @@ function doXmlExtraParameterListEntry ($resource, $attributes) {
        // There are three attributes, by default
        if (count($attributes) != 3) {
                // Not the right count
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
        } elseif (!isset($attributes['NAME'])) {
                // 'NAME' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
        } elseif (!isset($attributes['TYPE'])) {
                // 'TYPE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
        } elseif (!isInvalidXmlType($attributes['TYPE'])) {
                // No valid type
-               debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
        } elseif (!isset($attributes['VALUE'])) {
                // 'VALUE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
        } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
                // Not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list not included around this node. Please fix your XML.');
        }
 
        // Add the entry to the list
        addXmlValueToCallbackAttributes('extra_list', $attributes);
 }
 
+// Handles the XML node 'time-columns-list'
+function doXmlTimeColumnsList ($resource, $attributes) {
+       // There should be no attributes
+       if (count($attributes) > 0) {
+               // Please don't add any attributes to foo-list nodes
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
+       } // END - if
+
+       // Add an empty list
+       $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['time_columns'] = array();
+}
+
+// Handles the XML node 'time-columns-list-entry'
+function doXmlTimeColumnsListEntry ($resource, $attributes) {
+       // There are three attributes, by default
+       if (count($attributes) != 3) {
+               // Not the right count
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+       } elseif (!isset($attributes['NAME'])) {
+               // 'NAME' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+       } elseif (!isset($attributes['TYPE'])) {
+               // 'TYPE' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+       } elseif (!isInvalidXmlType($attributes['TYPE'])) {
+               // No valid type
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+       } elseif (!isset($attributes['VALUE'])) {
+               // 'VALUE' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+       } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
+               // Not valid/verifyable
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
+       } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['time_columns'])) {
+               // doXmlCallbackFunction is missing
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list not included around this node. Please fix your XML.');
+       }
+
+       // Add the entry to the list
+       addXmlValueToCallbackAttributes('time_columns', $attributes);
+}
+
 // Handles the XML node 'extra-parameter-member-list'
 function doXmlExtraParameterMemberList ($resource, $attributes) {
        // There should be no attributes
        if (count($attributes) > 0) {
                // Please don't add any attributes to foo-list nodes
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['member_list'])) {
                // This list should be created already
-               debug_report_bug(__FUNCTION__, __LINE__, 'member_list should be already created.');
+               reportBug(__FUNCTION__, __LINE__, 'member_list should be already created.');
+       }
+}
+
+// Handles the XML node 'extra-parameter-reload-list'
+function doXmlExtraParameterReloadList ($resource, $attributes) {
+       // There should be no attributes
+       if (count($attributes) > 0) {
+               // Please don't add any attributes to foo-list nodes
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
+       } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['reload_list'])) {
+               // This list should be created already
+               reportBug(__FUNCTION__, __LINE__, 'reload_list should be already created.');
        }
 }
 
@@ -249,55 +324,169 @@ function doXmlExtraParameterMemberListEntry ($resource, $attributes) {
        // There are three attributes, by default
        if (count($attributes) != 3) {
                // Not the right count
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
        } elseif (!isset($attributes['NAME'])) {
                // 'NAME' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
        } elseif (!isset($attributes['TYPE'])) {
                // 'TYPE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
        } elseif (!isInvalidXmlType($attributes['TYPE'])) {
                // No valid type
-               debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
        } elseif (!isset($attributes['VALUE'])) {
                // 'VALUE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
        } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
                // Not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['member_list'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/member-list not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/member-list not included around this node. Please fix your XML.');
        }
 
        // Add the entry to the list
        addXmlValueToCallbackAttributes('extra_list', $attributes, 'member_list');
 }
 
+// Handles the XML node 'extra-parameter-reload-list-entry'
+function doXmlExtraParameterReloadListEntry ($resource, $attributes) {
+       // There are three attributes, by default
+       if (count($attributes) != 3) {
+               // Not the right count
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+       } elseif (!isset($attributes['NAME'])) {
+               // 'NAME' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+       } elseif (!isset($attributes['TYPE'])) {
+               // 'TYPE' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+       } elseif (!isInvalidXmlType($attributes['TYPE'])) {
+               // No valid type
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+       } elseif (!isset($attributes['VALUE'])) {
+               // 'VALUE' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+       } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
+               // Not valid/verifyable
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
+       } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['reload_list'])) {
+               // doXmlCallbackFunction is missing
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/reload-list not included around this node. Please fix your XML.');
+       }
+
+       // Add the entry to the list
+       addXmlValueToCallbackAttributes('extra_list', $attributes, 'reload_list');
+}
+
+// Handles the XML node 'extra-parameter-added-list'
+function doXmlExtraParameterAddedList ($resource, $attributes) {
+       // There should be no attributes
+       if (count($attributes) > 0) {
+               // Please don't add any attributes to foo-list nodes
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
+       } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['added_list'])) {
+               // This list should be created already
+               reportBug(__FUNCTION__, __LINE__, 'added_list should be already created.');
+       }
+}
+
+// Handles the XML node 'extra-parameter-added-list-entry'
+function doXmlExtraParameterAddedListEntry ($resource, $attributes) {
+       // There are three attributes, by default
+       if (count($attributes) != 3) {
+               // Not the right count
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+       } elseif (!isset($attributes['NAME'])) {
+               // 'NAME' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+       } elseif (!isset($attributes['TYPE'])) {
+               // 'TYPE' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+       } elseif (!isInvalidXmlType($attributes['TYPE'])) {
+               // No valid type
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+       } elseif (!isset($attributes['VALUE'])) {
+               // 'VALUE' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+       } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
+               // Not valid/verifyable
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
+       } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['added_list'])) {
+               // doXmlCallbackFunction is missing
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/added-list not included around this node. Please fix your XML.');
+       }
+
+       // Add the entry to the list
+       addXmlValueToCallbackAttributes('extra_list', $attributes, 'added_list');
+}
+
+// Handles the XML node 'extra-parameter-created-list'
+function doXmlExtraParameterCreatedList ($resource, $attributes) {
+       // There should be no attributes
+       if (count($attributes) > 0) {
+               // Please don't add any attributes to foo-list nodes
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
+       } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['created_list'])) {
+               // This list should be created already
+               reportBug(__FUNCTION__, __LINE__, 'created_list should be already created.');
+       }
+}
+
+// Handles the XML node 'extra-parameter-created-list-entry'
+function doXmlExtraParameterCreatedListEntry ($resource, $attributes) {
+       // There are three attributes, by default
+       if (count($attributes) != 3) {
+               // Not the right count
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+       } elseif (!isset($attributes['NAME'])) {
+               // 'NAME' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+       } elseif (!isset($attributes['TYPE'])) {
+               // 'TYPE' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+       } elseif (!isInvalidXmlType($attributes['TYPE'])) {
+               // No valid type
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+       } elseif (!isset($attributes['VALUE'])) {
+               // 'VALUE' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+       } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
+               // Not valid/verifyable
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
+       } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['created_list'])) {
+               // doXmlCallbackFunction is missing
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/created-list not included around this node. Please fix your XML.');
+       }
+
+       // Add the entry to the list
+       addXmlValueToCallbackAttributes('extra_list', $attributes, 'created_list');
+}
+
 // Handles the XML node 'status-change-column'
 function doXmlStatusChangeColumn ($resource, $attributes) {
        // There are three attributes, by default
        if (count($attributes) != 3) {
                // Not the right count
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
        } elseif (!isset($attributes['NAME'])) {
                // 'NAME' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
        } elseif (!isset($attributes['TYPE'])) {
                // 'TYPE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
        } elseif (!isInvalidXmlType($attributes['TYPE'])) {
                // No valid type
-               debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
        } elseif (!isset($attributes['VALUE'])) {
                // 'VALUE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
        } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
                // Not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
        }
 
        // Add the entry to the list
@@ -309,10 +498,10 @@ function doXmlStatusChangeList ($resource, $attributes) {
        // There should be no attributes
        if (count($attributes) > 0) {
                // Please don't add any attributes to foo-list nodes
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['status_list'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/status-list not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/status-list not included around this node. Please fix your XML.');
        }
 }
 
@@ -321,28 +510,28 @@ function doXmlStatusChangeListEntry ($resource, $attributes) {
        // There are for attributes, by default
        if (count($attributes) != 4) {
                // Not the right count
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 4 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 4 attributes, got ' . count($attributes));
        } elseif (!isset($attributes['NAME'])) {
                // 'NAME' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
        } elseif (!isset($attributes['TYPE'])) {
                // 'TYPE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
        } elseif (!isInvalidXmlType($attributes['TYPE'])) {
                // No valid type
-               debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
        } elseif (!isset($attributes['VALUE'])) {
                // 'VALUE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
        } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['OLD'])) {
                // Not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute OLD does not validate. TYPE=' . $attributes['TYPE'] . ',OLD=' . $attributes['OLD']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute OLD does not validate. TYPE=' . $attributes['TYPE'] . ',OLD=' . $attributes['OLD']);
        } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
                // Not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['status_list'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/member-list not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/change-list not included around this node. Please fix your XML.');
        }
 
        // Add the entry to the list
@@ -354,30 +543,29 @@ function doXmlEnableModifyEntries ($resource, $attributes) {
        // There are three attributes, by default
        if (count($attributes) != 3) {
                // Not the right count
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
        } elseif (!isset($attributes['NAME'])) {
                // 'NAME' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
        } elseif (!isset($attributes['TYPE'])) {
                // 'TYPE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
        } elseif (!isInvalidXmlType($attributes['TYPE'])) {
                // No valid type
-               debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
        } elseif (!isset($attributes['VALUE'])) {
                // 'VALUE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
        } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
                // Not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
        }
 
        // Add the entry to the list
        addXmlValueToCallbackAttributes('enable_modify_entries', $attributes);
-       //$GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['enable_modify_entries'] = convertStringToBoolean($attributes['VALUE']);
 }
 
 // Handles the XML node 'table-id-column'
@@ -385,30 +573,29 @@ function doXmlTableIdColumn ($resource, $attributes) {
        // There are three attributes, by default
        if (count($attributes) != 3) {
                // Not the right count
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
        } elseif (!isset($attributes['NAME'])) {
                // 'NAME' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
        } elseif (!isset($attributes['TYPE'])) {
                // 'TYPE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
        } elseif (!isInvalidXmlType($attributes['TYPE'])) {
                // No valid type
-               debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
        } elseif (!isset($attributes['VALUE'])) {
                // 'VALUE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
        } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
                // Not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
        }
 
        // Add the entry to the array
        addXmlValueToCallbackAttributes('table_id_column', $attributes);
-       //$GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['table_id_column'] = $attributes['VALUE'];
 }
 
 // Handles the XML node 'table-userid-column'
@@ -416,30 +603,29 @@ function doXmlTableUseridColumn ($resource, $attributes) {
        // There are three attributes, by default
        if (count($attributes) != 3) {
                // Not the right count
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
        } elseif (!isset($attributes['NAME'])) {
                // 'NAME' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
        } elseif (!isset($attributes['TYPE'])) {
                // 'TYPE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
        } elseif (!isInvalidXmlType($attributes['TYPE'])) {
                // No valid type
-               debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
        } elseif (!isset($attributes['VALUE'])) {
                // 'VALUE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
        } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
                // Not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
        }
 
        // Add the entry to the array
        addXmlValueToCallbackAttributes('table_userid_column', $attributes);
-       //$GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['table_userid_column'] = $attributes['VALUE'];
 }
 
 // Handles the XML node 'raw-userid-column-key'
@@ -447,30 +633,59 @@ function doXmlRawUseridColumnKey ($resource, $attributes) {
        // There are three attributes, by default
        if (count($attributes) != 3) {
                // Not the right count
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
        } elseif (!isset($attributes['NAME'])) {
                // 'NAME' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
        } elseif (!isset($attributes['TYPE'])) {
                // 'TYPE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
        } elseif (!isInvalidXmlType($attributes['TYPE'])) {
                // No valid type
-               debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
        } elseif (!isset($attributes['VALUE'])) {
                // 'VALUE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
        } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
                // Not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
        }
 
        // Add the entry to the array
        addXmlValueToCallbackAttributes('raw_userid_column_key', $attributes);
-       //$GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['raw_userid_column_key'] = $attributes['VALUE'];
+}
+
+// Handles the XML node 'cache-file'
+function doXmlCacheFile ($resource, $attributes) {
+       // There are three attributes, by default
+       if (count($attributes) != 3) {
+               // Not the right count
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+       } elseif (!isset($attributes['NAME'])) {
+               // 'NAME' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+       } elseif (!isset($attributes['TYPE'])) {
+               // 'TYPE' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+       } elseif (!isInvalidXmlType($attributes['TYPE'])) {
+               // No valid type
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+       } elseif (!isset($attributes['VALUE'])) {
+               // 'VALUE' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+       } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
+               // Not valid/verifyable
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
+       } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
+               // doXmlCallbackFunction is missing
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
+       }
+
+       // Add the entry to the array
+       addXmlValueToCallbackAttributes('cache_file', $attributes);
 }
 
 //-----------------------------------------------------------------------------
@@ -482,7 +697,16 @@ function doXmlAdminListData ($resource, $attributes) {
        // There should be no attributes
        if (count($attributes) > 0) {
                // Please don't add any attributes to foo-list nodes
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
+       } // END - if
+}
+
+// Handles the XML node 'member-list-data'
+function doXmlMemberListData ($resource, $attributes) {
+       // There should be no attributes
+       if (count($attributes) > 0) {
+               // Please don't add any attributes to foo-list nodes
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
        } // END - if
 }
 
@@ -491,7 +715,7 @@ function doXmlDataTables ($resource, $attributes) {
        // There should be no attributes
        if (count($attributes) > 0) {
                // Please don't add any attributes to foo-list nodes
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
        } // END - if
 }
 
@@ -500,28 +724,28 @@ function doXmlDataTable ($resource, $attributes) {
        // There are three attributes, by default
        if (count($attributes) != 3) {
                // Not the right count
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
        } elseif (!isset($attributes['VALUE'])) {
                // 'VALUE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
        } elseif (!isset($attributes['TYPE'])) {
                // 'TYPE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
        } elseif (!isInvalidXmlType($attributes['TYPE'])) {
                // No valid type
-               debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
        } elseif (!isset($attributes['ALIAS'])) {
                // 'ALIAS' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute ALIAS not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute ALIAS not found.');
        } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
                // Not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
        } elseif ((trim($attributes['ALIAS']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['ALIAS']))) {
                // Not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. ALIAS=' . $attributes['ALIAS']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. ALIAS=' . $attributes['ALIAS']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
        }
 
        // Add the entry to the array
@@ -533,10 +757,10 @@ function doXmlSelectDataFromList ($resource, $attributes) {
        // There should be no attributes
        if (count($attributes) > 0) {
                // Please don't add any attributes to foo-list nodes
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.');
        }
 
        // Add an empty list
@@ -548,34 +772,34 @@ function doXmlSelectDataFromListEntry ($resource, $attributes) {
        // There are five attributes, by default
        if (count($attributes) != 5) {
                // Not the right count
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes));
        } elseif (!isset($attributes['VALUE'])) {
                // 'VALUE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
        } elseif (!isset($attributes['TYPE'])) {
                // 'TYPE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
        } elseif (!isInvalidXmlType($attributes['TYPE'])) {
                // No valid type
-               debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
        } elseif (!isset($attributes['ALIAS'])) {
                // 'ALIAS' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute ALIAS not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute ALIAS not found.');
        } elseif (!isset($attributes['FUNCTION'])) {
                // 'FUNCTION' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute FUNCTION not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute FUNCTION not found.');
        } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
                // 'VALUE' not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
        } elseif ((trim($attributes['ALIAS']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['ALIAS']))) {
                // 'ALIAS' not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute ALIAS does not validate. ALIAS=' . $attributes['ALIAS']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute ALIAS does not validate. ALIAS=' . $attributes['ALIAS']);
        } elseif ((trim($attributes['FUNCTION']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['FUNCTION']))) {
                // 'FUNCTION' not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute FUNCTION does not validate. FUNCTION=' . $attributes['FUNCTION']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute FUNCTION does not validate. FUNCTION=' . $attributes['FUNCTION']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_column_list'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/select-data-from-list not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/select-data-from-list not included around this node. Please fix your XML.');
        }
 
        // Add the entry to the array
@@ -587,10 +811,10 @@ function doXmlWhereSelectFromList ($resource, $attributes) {
        // There should be no attributes
        if (count($attributes) > 0) {
                // Please don't add any attributes to foo-list nodes
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.');
        }
 
        // Add an empty list
@@ -602,58 +826,79 @@ function doXmlWhereSelectFromListEntry ($resource, $attributes) {
        // There are five attributes, by default
        if (count($attributes) != 5) {
                // Not the right count
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes));
        } elseif (!isset($attributes['TYPE'])) {
                // 'TYPE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
        } elseif (!isset($attributes['TABLE'])) {
                // 'TABLE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TABLE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TABLE not found.');
        } elseif (!isset($attributes['VALUE'])) {
                // 'VALUE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
        } elseif (!isset($attributes['CONDITION'])) {
                // 'CONDITION' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute CONDITION not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute CONDITION not found.');
        } elseif (!isset($attributes['LOOK-FOR'])) {
                // 'LOOK-FOR' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute LOOK-FOR not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute LOOK-FOR not found.');
        } elseif (!isInvalidXmlType($attributes['TYPE'])) {
                // No valid type
-               debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
        } elseif ((trim($attributes['TABLE']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['TABLE']))) {
                // 'TABLE' not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute TABLE does not validate. TABLE=' . $attributes['TABLE']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute TABLE does not validate. TABLE=' . $attributes['TABLE']);
        } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
                // 'VALUE' not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
        } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['CONDITION'])) {
                // 'CONDITION' not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute CONDITION does not validate. CONDITION=' . $attributes['CONDITION']);
-       } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['LOOK-FOR'])) {
-               // 'LOOK-FOR' not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute LOOK-FOR does not validate. LOOK-FOR=' . $attributes['LOOK-FOR']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute CONDITION does not validate. CONDITION=' . $attributes['CONDITION']);
        } elseif (!isXmlConditionValid($attributes['CONDITION'])) {
                // 'CONDITION' is not known
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute CONDITION is not valid. LOOK-FOR=' . $attributes['CONDITION']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute CONDITION is not valid. LOOK-FOR=' . $attributes['CONDITION']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_column_list'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-column-list not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-column-list not included around this node. Please fix your XML.');
        }
 
        // Add the entry to the array
        addXmlValueToCallbackAttributes('where_select_list', $attributes);
 }
 
+// Handles the XML node 'where-condition'
+function doXmlWhereCondition ($resource, $attributes) {
+       // There are two attributes, by default
+       if (count($attributes) != 3) {
+               // Please don't add any attributes to foo-list nodes
+               reportBug(__FUNCTION__, __LINE__, 'Expected 2 attributes because this is a where-condition node, got ' . count($attributes));
+       } elseif (!isset($attributes['TYPE'])) {
+               // 'TYPE' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+       } elseif (!isset($attributes['CONDITION'])) {
+               // 'CONDITION' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute CONDITION not found.');
+       } elseif (!isset($attributes['NAME'])) {
+               // 'NAME' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+       } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) {
+               // doXmlCallbackFunction is missing
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.');
+       }
+
+       // Add an empty list
+       addXmlValueToCallbackAttributes('where_condition', $attributes);
+}
+
 // Handles the XML node 'order-by-list'
 function doXmlOrderByList ($resource, $attributes) {
        // There should be no attributes
        if (count($attributes) > 0) {
                // Please don't add any attributes to foo-list nodes
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.');
        }
 
        // Add an empty list
@@ -665,34 +910,34 @@ function doXmlOrderByListEntry ($resource, $attributes) {
        // There are four attributes, by default
        if (count($attributes) != 4) {
                // Not the right count
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes));
        } elseif (!isset($attributes['ORDER'])) {
                // 'ORDER' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute ORDER not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute ORDER not found.');
        } elseif (!isset($attributes['TYPE'])) {
                // 'TYPE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
        } elseif (!isset($attributes['TABLE'])) {
                // 'TABLE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TABLE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TABLE not found.');
        } elseif (!isset($attributes['VALUE'])) {
                // 'VALUE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
        } elseif (!isInvalidXmlType($attributes['TYPE'])) {
                // No valid type
-               debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
        } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['ORDER'])) {
                // 'ORDER' not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute ORDER does not validate. ORDER=' . $attributes['ORDER']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute ORDER does not validate. ORDER=' . $attributes['ORDER']);
        } elseif ((trim($attributes['TABLE']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['TABLE']))) {
                // 'TABLE' not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute TABLE does not validate. TABLE=' . $attributes['TABLE']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute TABLE does not validate. TABLE=' . $attributes['TABLE']);
        } elseif ((trim($attributes['VALUE']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE']))) {
                // 'VALUE' not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_column_list'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-column-list not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-column-list not included around this node. Please fix your XML.');
        }
 
        // Add the entry to the array
@@ -704,22 +949,22 @@ function doXmlListTemplate ($resource, $attributes) {
        // There are two attributes, by default
        if (count($attributes) != 2) {
                // Not the right count
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
        } elseif (!isset($attributes['VALUE'])) {
                // 'VALUE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
        } elseif (!isset($attributes['TYPE'])) {
                // 'TYPE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
        } elseif (!isInvalidXmlType($attributes['TYPE'])) {
                // No valid type
-               debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
        } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
                // Not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
        }
 
        // Add the entry to the array
@@ -731,22 +976,22 @@ function doXmlListRowTemplate ($resource, $attributes) {
        // There are two attributes, by default
        if (count($attributes) != 2) {
                // Not the right count
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
        } elseif (!isset($attributes['VALUE'])) {
                // 'VALUE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
        } elseif (!isset($attributes['TYPE'])) {
                // 'TYPE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
        } elseif (!isInvalidXmlType($attributes['TYPE'])) {
                // No valid type
-               debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
        } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
                // Not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
        }
 
        // Add the entry to the array
@@ -758,10 +1003,10 @@ function doXmlColumnCallbackList ($resource, $attributes) {
        // There should be no attributes
        if (count($attributes) > 0) {
                // Please don't add any attributes to foo-list nodes
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.');
        }
 
        // Add an empty list
@@ -773,10 +1018,10 @@ function doXmlColumnCallbackListEntry ($resource, $attributes) {
        // There should be no attributes
        if (count($attributes) > 0) {
                // Please don't add any attributes to foo-list nodes
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_callback_list'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/column-callback not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/column-callback not included around this node. Please fix your XML.');
        }
 }
 
@@ -785,28 +1030,28 @@ function doXmlColumnCallbackData ($resource, $attributes) {
        // There are three attributes, by default
        if (count($attributes) != 3) {
                // Not the right count
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
        } elseif (!isset($attributes['VALUE'])) {
                // 'VALUE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
        } elseif (!isset($attributes['TYPE'])) {
                // 'TYPE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
        } elseif (!isset($attributes['CALLBACK'])) {
                // 'CALLBACK' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute CALLBACK not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute CALLBACK not found.');
        } elseif (!isInvalidXmlType($attributes['TYPE'])) {
                // No valid type
-               debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
        } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
                // Not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
        } elseif ((trim($attributes['CALLBACK']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['CALLBACK']))) {
                // 'CALLBACK' not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute CALLBACK does not validate. CALLBACK=' . $attributes['CALLBACK']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute CALLBACK does not validate. CALLBACK=' . $attributes['CALLBACK']);
        }
 
        // Add the entry to the array
@@ -818,10 +1063,10 @@ function doXmlCallbackExtraParameterList ($resource, $attributes) {
        // There should be no attributes
        if (count($attributes) > 0) {
                // Please don't add any attributes to foo-list nodes
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 1 attributes because this is a named foo-list node, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 1 attributes because this is a named foo-list node, got ' . count($attributes));
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_callback_list'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/column-callback-list not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/column-callback-list not included around this node. Please fix your XML.');
        } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['__EXTRA_PARAMETER'])) {
                // Abort silently here, no one wants to kill this array
                return;
@@ -836,25 +1081,25 @@ function doXmlCallbackExtraParameterListEntry ($resource, $attributes) {
        // There are three attributes, by default
        if (count($attributes) != 3) {
                // Not the right count
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes));
        } elseif (!isset($attributes['COLUMN'])) {
                // 'COLUMN' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute COLUMN not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute COLUMN not found.');
        } elseif (!isset($attributes['TYPE'])) {
                // 'TYPE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
        } elseif (!isInvalidXmlType($attributes['TYPE'])) {
                // No valid type
-               debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
        } elseif (!isset($attributes['VALUE'])) {
                // 'VALUE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
        } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
                // 'VALUE' not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['__EXTRA_PARAMETER'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/__EXTRA_PARAMETER not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/__EXTRA_PARAMETER not included around this node. Please fix your XML.');
        }
 
        // Add the entry to the array
@@ -866,22 +1111,22 @@ function doXmlNoEntryFoundMessage ($resource, $attributes) {
        // There are two attributes, by default
        if (count($attributes) != 2) {
                // Not the right count
-               debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
        } elseif (!isset($attributes['VALUE'])) {
                // 'VALUE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
        } elseif (!isset($attributes['TYPE'])) {
                // 'TYPE' not found
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
        } elseif (!isInvalidXmlType($attributes['TYPE'])) {
                // No valid type
-               debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
        } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
                // Not valid/verifyable
-               debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
                // doXmlCallbackFunction is missing
-               debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
        }
 
        // Add the entry to the array
@@ -955,12 +1200,6 @@ function addXmlValueToCallbackAttributes ($element, $attributes, $extraKey = '',
                //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'TYPE=' . $attributes['TYPE'] . ',element=' . $element);
                $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['VALUE'] . '_list'] = array();
        } elseif (!empty($extraKey)) {
-               // Is it bool?
-               if (($attributes['TYPE'] == 'bool') && (isset($attributes['VALUE']))) {
-                       // Then convert VALUE
-                       $attributes['VALUE'] = convertStringToBoolean($attributes['VALUE']);
-               } // END - if
-
                // Sub-array (one level only)
                //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ' - ANALYSING...');
                if (trim($attributes['NAME']) == '') {
@@ -981,12 +1220,19 @@ function addXmlValueToCallbackAttributes ($element, $attributes, $extraKey = '',
                 * ALIAS and FUNCTION detected? This may happen with SQL queries
                 * like: UNIX_TIMESTAMP(`foo_timestamp`) AS `foo_timestamp`
                 */
+
+               // Fix missing 'NAME'
+               if (!isset($attributes['NAME'])) {
+                       $attributes['NAME'] = '';
+               } // END - if
+
                // Init array
                $array =  array(
                        'column'   => trim($attributes['VALUE']),
                        'alias'    => trim($attributes['ALIAS']),
                        'function' => trim($attributes['FUNCTION']),
-                       'table'    => trim($attributes['TABLE'])
+                       'table'    => trim($attributes['TABLE']),
+                       'name'     => trim($attributes['NAME'])
                );
 
                // Add the entry
@@ -1004,6 +1250,10 @@ function addXmlValueToCallbackAttributes ($element, $attributes, $extraKey = '',
 
                //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',CONDITION[' . gettype($attributes['CONDITION']) . ']=' . $attributes['CONDITION'] . ',LOOK-FOR[' . gettype($attributes['LOOK-FOR']) . ']=' . $attributes['LOOK-FOR'] . ' - CONDITION! (VALUE=' . $attributes['VALUE'] . ')');
                $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][] = $array;
+       } elseif ((isset($attributes['CONDITION'])) && (isset($attributes['NAME']))) {
+               // CONDITION/NAME detected
+               //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',CONDITION[' . gettype($attributes['CONDITION']) . ']=' . $attributes['CONDITION'] . ',NAME[' . gettype($attributes['NAME']) . ']=' . $attributes['NAME'] . ' - CONDITION!');
+               $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['NAME']] = $attributes['CONDITION'];
        } elseif (isset($attributes['CALLBACK'])) {
                // CALLBACK/VALUE detected
                //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',CALLBACK[' . gettype($attributes['CALLBACK']) . ']=' . $attributes['CALLBACK'] . ' - CALLBACK! (VALUE=' . $attributes['VALUE'] . ')');
@@ -1022,7 +1272,7 @@ function addXmlValueToCallbackAttributes ($element, $attributes, $extraKey = '',
                $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][] = $attributes['VALUE'];
        } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['NAME']])) {
                // Already created
-               debug_report_bug(__FUNCTION__, __LINE__, 'NAME=' . $attributes['NAME'] . ' already addded to ' . $element . ' attributes=<pre>' . print_r($attributes, true) . '</pre>');
+               reportBug(__FUNCTION__, __LINE__, 'NAME=' . $attributes['NAME'] . ' already addded to ' . $element . ' attributes=<pre>' . print_r($attributes, TRUE) . '</pre>');
        } else {
                // Use from NAME
                //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',NAME=' . $attributes['NAME'] . ',VALUE[' . gettype($attributes['VALUE']) . ']=' . $attributes['VALUE'] . ' - NAME!');
@@ -1036,16 +1286,16 @@ function addXmlValueToCallbackAttributes ($element, $attributes, $extraKey = '',
 //-----------------------------------------------------------------------------
 
 // Execute function for doXmlCallbackFunction()
-function doXmlCallbackFunctionExecute ($callbackFunction, $args) {
+function doXmlCallbackFunctionExecute ($callbackName, $args, $columnIndex) {
        // Is 'id_index' set and form sent?
        if ((isset($args['id_index'])) && (isFormSent())) {
                // Prepare 'id_index'
-               $args['id_index'] = postRequestParameter($args['id_index']);
+               $args['id_index'] = postRequestElement($args['id_index']);
        } // END - if
 
        // Just call it
-       //* DEBUG: */ die('callbackFunction=' . $callbackFunction . ',args=<pre>'.print_r($args, true).'</pre>');
-       call_user_func_array($callbackFunction, $args);
+       //* DEBUG: */ die('callbackFunction=' . $callbackName . ',columnIndex=' . $columnIndex . ',args=<pre>'.print_r($args, TRUE).'</pre>');
+       call_user_func_array($callbackName, $args);
 }
 
 // [EOF]