+// Handles the XML node 'table-join-condition'
+function doXmlTableJoinCondition ($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
+}
+
+// Handles the XML node 'table-join-type'
+function doXmlTableJoinType ($resource, $attributes) {
+ if (count($attributes) != 1) {
+ // Not the right count
+ reportBug(__FUNCTION__, __LINE__, 'Expected 1 attributes, got ' . count($attributes));
+ } elseif (!isset($attributes['TYPE'])) {
+ // 'TYPE' not found
+ reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+ } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['table_join_type'])) {
+ // Array is already defined
+ reportBug(__FUNCTION__, __LINE__, 'Required XML node table-join-type already set. Only one JOIN is currently supported.');
+ }
+
+ // Init array
+ $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['table_join_type'] = array();
+
+ // Add the entry to the array
+ addXmlValueToCallbackAttributes('table_join_type', $attributes);
+}
+
+// Handles the XML node 'table-join-name'
+function doXmlTableJoinName ($resource, $attributes) {
+ if (count($attributes) != 2) {
+ // Not the right count
+ reportBug(__FUNCTION__, __LINE__, 'Expected 2 attributes, got ' . count($attributes));
+ } elseif (!isset($attributes['NAME'])) {
+ // 'NAME' not found
+ reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+ } elseif (!isset($attributes['ALIAS'])) {
+ // 'ALIAS' not found
+ reportBug(__FUNCTION__, __LINE__, 'Required attribute ALIAS not found.');
+ } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['table_join_name'])) {
+ // Array is already defined
+ reportBug(__FUNCTION__, __LINE__, 'Required XML node table-join-name already set. Only one JOIN is currently supported.');
+ }
+
+ // Init array
+ $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['table_join_name'] = array();
+
+ // Add the entry to the array
+ addXmlValueToCallbackAttributes('table_join_name', $attributes);
+}
+
+// Handles the XML node 'join-on'
+function doXmlJoinOn ($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
+}
+
+// Handles the XML node 'join-on-left-table'
+function doXmlJoinOnLeftTable ($resource, $attributes) {
+ if (count($attributes) != 3) {
+ // Not the right count
+ reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+ } elseif (!isset($attributes['TYPE'])) {
+ // 'TYPE' not found
+ reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+ } elseif (!isset($attributes['NAME'])) {
+ // 'NAME' not found
+ reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+ } elseif (!isset($attributes['COLUMN'])) {
+ // 'COLUMN' not found
+ reportBug(__FUNCTION__, __LINE__, 'Required attribute COLUMN not found.');
+ } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['NAME'])) {
+ // 'NAME' not valid/verifyable
+ reportBug(__FUNCTION__, __LINE__, 'Attribute NAME does not validate. NAME=' . $attributes['NAME']);
+ } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['COLUMN'])) {
+ // 'COLUMN' not valid/verifyable
+ reportBug(__FUNCTION__, __LINE__, 'Attribute COLUMN does not validate. COLUMN=' . $attributes['COLUMN']);
+ } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['join_on_left_table'])) {
+ // Array is already defined
+ reportBug(__FUNCTION__, __LINE__, 'Required XML node join-on-left-table already set. Only one JOIN is currently supported.');
+ }
+
+ // Init array
+ $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['join_on_left_table'] = array();
+
+ // Add the entry to the array
+ addXmlValueToCallbackAttributes('join_on_left_table', $attributes);
+}
+
+// Handles the XML node 'join-on-right-table'
+function doXmlJoinOnRightTable ($resource, $attributes) {
+ if (count($attributes) != 3) {
+ // Not the right count
+ reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+ } elseif (!isset($attributes['TYPE'])) {
+ // 'TYPE' not found
+ reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+ } elseif (!isset($attributes['NAME'])) {
+ // 'NAME' not found
+ reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+ } elseif (!isset($attributes['COLUMN'])) {
+ // 'COLUMN' not found
+ reportBug(__FUNCTION__, __LINE__, 'Required attribute COLUMN not found.');
+ } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['NAME'])) {
+ // 'NAME' not valid/verifyable
+ reportBug(__FUNCTION__, __LINE__, 'Attribute NAME does not validate. NAME=' . $attributes['NAME']);
+ } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['COLUMN'])) {
+ // 'COLUMN' not valid/verifyable
+ reportBug(__FUNCTION__, __LINE__, 'Attribute COLUMN does not validate. COLUMN=' . $attributes['COLUMN']);
+ } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['join_on_right_table'])) {
+ // Array is already defined
+ reportBug(__FUNCTION__, __LINE__, 'Required XML node join-on-right-table already set. Only one JOIN is currently supported.');
+ }
+
+ // Init array
+ $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['join_on_right_table'] = array();
+
+ // Add the entry to the array
+ addXmlValueToCallbackAttributes('join_on_right_table', $attributes);
+}
+
+// Handles the XML node 'join-on-condition'
+function doXmlJoinOnCondition ($resource, $attributes) {
+ if (count($attributes) != 2) {
+ // Not the right count
+ reportBug(__FUNCTION__, __LINE__, 'Expected 2 attributes, 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 (!isXmlValueValid($attributes['TYPE'], $attributes['CONDITION'])) {
+ // 'CONDITION' not valid/verifyable
+ reportBug(__FUNCTION__, __LINE__, 'Attribute CONDITION does not validate. CONDITION=' . $attributes['CONDITION']);
+ } elseif (!isXmlConditionValid($attributes['CONDITION'])) {
+ // 'CONDITION' is not known
+ reportBug(__FUNCTION__, __LINE__, 'Attribute CONDITION is not valid. CONDITION=' . $attributes['CONDITION']);
+ } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['join_on_condition'])) {
+ // Array is already defined
+ reportBug(__FUNCTION__, __LINE__, 'Required XML node join-on-condition already set. Only one JOIN is currently supported.');
+ }
+
+ // Init array
+ $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['join_on_condition'] = array();
+
+ // Add the entry to the array
+ //die('<pre>'.print_r($attributes,true).'</pre>');
+ addXmlValueToCallbackAttributes('join_on_condition', $attributes);
+}
+