[Mapbender-commits] r7970 - branches/2.7/http/geoportal

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Jul 19 09:03:58 EDT 2011


Author: astrid_emde
Date: 2011-07-19 06:03:58 -0700 (Tue, 19 Jul 2011)
New Revision: 7970

Added:
   branches/2.7/http/geoportal/guiPortalAdminDe.sql
   branches/2.7/http/geoportal/mod_allow_publishing_metadata.php
Modified:
   branches/2.7/http/geoportal/mod_readOpenSearchResults.php
   branches/2.7/http/geoportal/mod_readOpenSearchResultsDetail.php
Log:
merged with trunk

Copied: branches/2.7/http/geoportal/guiPortalAdminDe.sql (from rev 7962, trunk/mapbender/http/geoportal/guiPortalAdminDe.sql)
===================================================================
--- branches/2.7/http/geoportal/guiPortalAdminDe.sql	                        (rev 0)
+++ branches/2.7/http/geoportal/guiPortalAdminDe.sql	2011-07-19 13:03:58 UTC (rev 7970)
@@ -0,0 +1,56 @@
+INSERT INTO gui (gui_id, gui_name, gui_description, gui_public) VALUES ('PortalAdmin_DE','PortalAdmin_DE','Administrationsoberfläche',1);
+
+insert into gui_mb_user (fkey_gui_id,fkey_mb_user_id,mb_user_type) values ('PortalAdmin_DE',1,'owner');
+
+
+-- delete from gui_element where fkey_gui_id='PortalAdmin_DE';
+INSERT INTO gui (gui_id, gui_name, gui_description, gui_public) VALUES ('PortalAdmin_DE','PortalAdmin_DE','Administrationsoberfläche',1);
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','body',1,1,'Navigation','','body','','',0,0,200,40,NULL ,'','','','../geoportal/mod_revertGuiSessionSettings.php','','','','');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('PortalAdmin_DE','body','favicon','../img/favicon.png','favicon','php_var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('PortalAdmin_DE','body','includeWhileLoading','','show splash screen while the application is loading','php_var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('PortalAdmin_DE','body','jq_ui_effects_transfer','.ui-effects-transfer { z-index:1003; border: 2px dotted gray; } ','','text/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('PortalAdmin_DE','body','jq_ui_theme','../extensions/jquery-ui-1.7.2.custom/css/smoothness/jquery-ui-1.7.2.custom.css','','file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('PortalAdmin_DE','body','use_load_message','false','show splash screen while the application is loading','php_var');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','jq_ui_widget',1,1,'jQuery UI widget','','','','',NULL ,NULL,NULL ,NULL,NULL ,'','','','','../extensions/jquery-ui-1.8.1.custom/development-bundle/ui/jquery.ui.widget.js','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','jq_ui',1,1,'jQuery UI core','','','','',NULL ,NULL,NULL ,NULL,NULL ,'','','','','../extensions/jquery-ui-1.8.1.custom/development-bundle/ui/jquery.ui.core.js','','','');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('PortalAdmin_DE','jq_ui','css','../extensions/jquery-ui-1.7.2.custom/css/ui-lightness/jquery-ui-1.7.2.custom.css','','file/css');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','i18n',1,1,'Internationalization module, collects data from all elements and sends them to the server in a single POST request. The strings are translated via gettext only.','Internationalization','div','','',NULL ,NULL,NULL ,NULL,NULL ,'','','div','../plugins/mb_i18n.js','','','','http://www.mapbender.org/Gettext');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','groupUser_icon',2,1,'icon','','img','../img/gnome/groupUser.png','',0,0,NULL ,NULL,2,'','','','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','menu_category',2,1,'GUI admin menu','Kategorien','div','','',NULL ,NULL,NULL ,NULL,NULL ,'','','div','../plugins/mb_div_collection.js','','createGuiCategory_collection,deleteCategory_collection','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','groupUser_collection',2,1,'Put existing divs in new div object. List the elements comma-separated under target, and make sure they have a title.','','div','','',0,40,200,30,NULL ,'','','div','../plugins/mb_div_collection.js','','Group_User,groupUser_icon','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','showLoggedUser',2,1,'Anzeige des eingeloggten Benutzers','','iframe','../php/mod_showLoggedUser.php?sessionID','frameborder="0" scrolling=''no''',1,1,200,30,1,'background-color:lightgrey;','','iframe','','','','','');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('PortalAdmin_DE','showLoggedUser','css_file_user_logged','../css/administration_alloc.css','file/css','file/css');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','menu_group',2,1,'GUI admin menu','Gruppen','div','','',NULL ,NULL,NULL ,NULL,NULL ,'','','div','../plugins/mb_div_collection.js','','editGroup_collection,groupUser_collection','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','editGroup_collection',2,1,'Put existing divs in new div object. List the elements comma-separated under target, and make sure they have a title.','','div','','',0,0,200,30,NULL ,'','','div','../plugins/mb_div_collection.js','','editGroup,editGroup_icon','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','editGroup_icon',2,1,'icon','','img','../img/gnome/editGroup.png','',0,0,NULL ,NULL,2,'','','','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','menu_role',2,1,'GUI admin menu','Rollen','div','','',NULL ,NULL,NULL ,NULL,NULL ,'','','div','../plugins/mb_div_collection.js','','groupUserRole_collection','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','editGroup',2,1,'Gruppe anlegen und editieren','Create and edit group','a','','href = "../php/mod_editGroup.php?sessionID"',80,15,200,20,NULL ,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','Gruppe anlegen und editieren','a','','','','','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','Group_User_Role',2,1,'Rollenzuweisung','Rollenzuweisung','a','','href = "../php/mod_group_user_role.php?sessionID"',80,15,210,20,5,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','Rollenzuweisung','a','','','','','http://www.mapbender.org/GUI_Category');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('PortalAdmin_DE','Group_User_Role','file css','../css/administration_alloc.css','file css','file/css');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','groupUserRole_collection',2,1,'Put existing divs in new div object. List the elements comma-separated under target, and make sure they have a title.','','div','','',0,0,200,30,NULL ,'','','div','../plugins/mb_div_collection.js','','Group_User_Role,groupUserRole_icon','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','createCategory',2,1,'Anwendungskategorie erstellen','Anwendungskategorie erstellen','a','','href = "../php/mod_createCategory.php?sessionID"',80,15,210,20,5,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','Anwendungskategorie erstellen','a','','','','','http://www.mapbender.org/GUI_Category');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','createGuiCategory_collection',2,1,'Put existing divs in new div object. List the elements comma-separated under target, and make sure they have a title.','','div','','',0,0,200,30,NULL ,'','','div','../plugins/mb_div_collection.js','','createCategory,createGuiCategory_icon','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','fullScreenIcon',2,1,'show iframe in new window','Open in new Window','img','../img/button_blue_red/resizemapsize_off.png','',120,320,24,24,NULL ,'','','','','','mapframe1','','');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('PortalAdmin_DE','fullScreenIcon','adjust_height','-35','to adjust the height of the mapframe on the bottom of the window','var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('PortalAdmin_DE','fullScreenIcon','adjust_width','30','to adjust the width of the mapframe on the right side of the window','var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('PortalAdmin_DE','fullScreenIcon','resize_option','button','auto (autoresize on load), button (resize by button)','var');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','fullScreen',2,1,'Link to open Admin in new window','Öffne in neuem Fenster','span','','onclick="window.open(window.location.href,''Administrations Fenster'',''scrollbars=yes,resizeable=yes'')"
+',10,320,100,20,NULL ,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','Zu klein? - Öffne in neuem Fenster','span','','','','','http://www.mapbender.org/index.php/');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','deleteCategory_icon',2,1,'icon','','img','../img/gnome/deleteCategories.png','',0,0,NULL ,NULL,2,'','','','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','groupUserRole_icon',2,1,'icon','','img','../img/gnome/group1.png','',0,0,NULL ,NULL,2,'','','','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','myGUIlist',2,1,'Zurück zur Anwendungsübersicht','Zurück zur Anwendungsübersicht','img','../img/button_blue_red/home_off.png','onClick="mod_home_init()" border=''0'' onmouseover=''this.src="../img/button_blue_red/home_over.png"'' onmouseout=''this.src="../img/button_blue_red/home_off.png"''',200,2,24,24,2,'','','','mod_home.php','','','','http://www.mapbender.org/index.php/MyGUIlist');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','deleteCategory_collection',2,1,'Put existing divs in new div object. List the elements comma-separated under target, and make sure they have a title.','','div','','',0,40,200,30,NULL ,'','','div','../plugins/mb_div_collection.js','','deleteCategory,deleteCategory_icon','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','jq_ui_mouse',2,1,'jQuery UI mouse','','','','',NULL ,NULL,NULL ,NULL,NULL ,'','','','','../extensions/jquery-ui-1.8.1.custom/development-bundle/ui/jquery.ui.mouse.js','','jq_ui_widget','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','jq_ui_position',2,1,'jQuery UI position','','','','',NULL ,NULL,NULL ,NULL,NULL ,'','','','','../extensions/jquery-ui-1.8.1.custom/development-bundle/ui/jquery.ui.position.js','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','createGuiCategory_icon',2,1,'icon','','img','../img/gnome/createCategories.png','',0,0,NULL ,NULL,2,'','','','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','deleteCategory',2,1,'Anwendungskategorie löschen','Anwendungskategorie löschen','a','','href = "../php/mod_deleteCategory.php?sessionID"',80,15,210,20,5,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','Anwendungskategorie löschen','a','','','','','http://www.mapbender.org/GUI_Category');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','Group_User',2,1,'Gruppen Nutzer Zuordnung','Gruppen <-> Nutzer','a','','href = "../php/mod_group_user.php?sessionID"',80,15,210,20,5,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','Gruppen Nutzer Zuordnung','a','','','','','http://www.mapbender.org/GUI_Category');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('PortalAdmin_DE','Group_User','file css','../css/administration_alloc.css','file css','file/css');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','jq_ui_button',4,1,'jQuery UI button','','','','',NULL ,NULL,NULL ,NULL,NULL ,'','','','','../extensions/jquery-ui-1.8.1.custom/development-bundle/ui/jquery.ui.button.js','','jq_ui,jq_ui_widget','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','jq_ui_dialog',5,1,'Dialog from jQuery UI framework','','','','',NULL ,NULL,NULL ,NULL,NULL ,'','','','','../extensions/jquery-ui-1.8.1.custom/development-bundle/ui/jquery.ui.dialog.js','','jq_ui,jq_ui_widget,jq_ui_button,jq_ui_draggable,jq_ui_mouse,jq_ui_position,jq_ui_resizable','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','jq_ui_draggable',5,1,'Draggable from the jQuery UI framework','','','','',NULL ,NULL,NULL ,NULL,NULL ,'','','','','../extensions/jquery-ui-1.8.1.custom/development-bundle/ui/jquery.ui.draggable.js','','jq_ui,jq_ui_mouse,jq_ui_widget','http://jqueryui.com/demos/draggable/');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','jq_ui_resizable',5,1,'Resizable from the jQuery UI framework','','','','',NULL ,NULL,NULL ,NULL,NULL ,'','','','../plugins/jq_ui_resizable.js','../extensions/jquery-ui-1.8.1.custom/development-bundle/ui/jquery.ui.resizable.js','','jq_ui,jq_ui_mouse,jq_ui_widget','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','mb_iframepopup',7,1,'iframepopup','','div','','',NULL ,NULL,NULL ,NULL,NULL ,'','','div','../plugins/mb_iframepopup.js','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('PortalAdmin_DE','mb_horizontal_accordion',10,1,'Put existing divs in new horizontal accordion div object. List the elements comma-separated under target, and make sure they have a title.','','div','','',0,0,NULL ,NULL,NULL ,'','<dl></dl>','div','../plugins/mb_horizontal_accordion.js','../../extensions/jqueryEasyAccordion/jquery.easyAccordion.js','menu_group,menu_role,menu_category','','');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('PortalAdmin_DE','mb_horizontal_accordion','Accordion css file','../extensions/jqueryEasyAccordion/mb_jquery.easyAccordion.css','','file/css');
+

Copied: branches/2.7/http/geoportal/mod_allow_publishing_metadata.php (from rev 7962, trunk/mapbender/http/geoportal/mod_allow_publishing_metadata.php)
===================================================================
--- branches/2.7/http/geoportal/mod_allow_publishing_metadata.php	                        (rev 0)
+++ branches/2.7/http/geoportal/mod_allow_publishing_metadata.php	2011-07-19 13:03:58 UTC (rev 7970)
@@ -0,0 +1,322 @@
+<?php
+# $Id: mod_group_user.php 7706 2011-03-15 13:44:54Z armin11 $
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS 
+#
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+$e_id = "allowPublishMetadata";
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+require_once(dirname(__FILE__)."/../../core/globalSettings.php");
+//include variable for registrating departments - this are the php element vars:
+//$authorizeRoleId
+//$adminGroupId
+include '../include/dyn_php.php';
+//group id of the users who have the right to registrate services
+//$adminGroupId = 25;
+//id of the role which will be given to the selected user - here metadata editor
+//$authorizeRoleId = 3;
+//here the primary group of the user is relevant therefor it will be a good idea to show the group names which are primary roles to some registrating user
+//get the selected group as the primary group of the current user!
+//get user id:
+$userId = (integer)$_SESSION["mb_user_id"];
+if (!is_int($userId)) {
+	echo _mb("You have no rights to use this module!");	
+	die();
+}
+$sqlGetPrimaryGroup = "SELECT fkey_mb_group_id FROM mb_user_mb_group WHERE fkey_mb_user_id = $1 and mb_user_mb_group_type = 2";
+$v = array($userId);
+$t = array('i');
+$resPrimaryGroup = db_prep_query($sqlGetPrimaryGroup,$v,$t);
+$cntPG = 0;
+while($row = db_fetch_array($resPrimaryGroup)){
+	$selected_group = $row["fkey_mb_group_id"];
+	$cntPG++;
+}
+
+if ($cntPG > 1) {
+	echo _mb("There are too many primary groups defined for the user with ID: ").$userId;
+	die();
+}
+if ($cntPG == 0) {
+//give an error if now primary_group is defined for the current user
+	echo _mb("You have not yet an primary group. Please contact the central system admin to define a primary group for user with ID: ").$userId;
+	die();
+}
+
+//get only those users which have the right to registrate and have a primary role defined - they are the metadata publishers in sense of the registry
+
+
+/*
+ * @security_patch irv done
+ */
+//security_patch_log(__FILE__,__LINE__);
+//import_request_variables("PG");
+
+$postvars = explode(",", "filter2,insert,remove,filter3,remove_user,selected_user");
+foreach ($postvars as $value) {
+   $$value = $_POST[$value];
+}
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';	
+?>
+<title>Allow departments to publish own metadata</title>
+<?php include '../include/dyn_css.php'; ?>
+
+<script language="JavaScript">
+function validate(wert){
+	if(wert == "remove"){
+		if(document.forms[0]["remove_user[]"].selectedIndex == -1){
+			document.getElementsByName("remove_user[]")[0].style.backgroundColor = '#ff0000';
+			return;
+		}
+		document.form1.remove.value = 'true';
+		document.form1.submit();
+	}
+	if(wert == "insert"){
+		if(document.forms[0]["selected_user[]"].selectedIndex == -1){
+			document.getElementsByName("selected_user[]")[0].style.backgroundColor = '#ff0000';
+			return;
+		}
+		document.form1.insert.value = 'true';
+		document.form1.submit();
+	}
+}
+/**
+ * filter the Userlist by str
+ */
+function filterUser(list, all, str){
+	str=str.toLowerCase();
+	var selection=[];
+	var i,j,selected;
+	for(i=0;i<list.options.length;i++){
+		if(list.options[i].selected)
+			selection[selection.length]=list.options[i].value;
+	}
+	
+	list.options.length = 0;
+	for(i=0; i<all.length; i++){
+		if(all[i]['name'].toLowerCase().indexOf(str)==-1)
+			continue;
+		selected=false;
+		for(j=0;j<selection.length;j++){
+			if(selection[j]==all[i]['id']){
+				selected=true;
+				break;
+			}
+		}
+		var newOption = new Option(selected?all[i]['name']+" ("+all[i]['email']+")":all[i]['name'],all[i]['id'],false,selected);
+		newOption.setAttribute("title", all[i]['email']);
+		list.options[list.options.length] = newOption;
+	}	
+}
+/**
+ * add Mail adress on selection
+ */
+function updateMail(list, all){
+	var j=0;
+	for(var i=0; i<list.options.length;i++){
+		if(list.options[i].selected){
+			for(j=j;j<all.length;j++){
+				if(all[j]['id']==list.options[i].value){
+					list.options[i].text=all[j]['name']+" ("+all[j]['email']+")";
+					list.options[i].selected = true;
+					break;
+				}
+			}
+		}
+		else{
+			for(j=j;j<all.length;j++){
+				if(all[j]['id']==list.options[i].value){
+					list.options[i].text=all[j]['name'];
+					list.options[i].selected = false;
+					break;
+				}
+			}
+		}
+	}
+}
+</script>
+
+</head>
+<body>
+<?php
+
+$fieldHeight = 20;
+
+$cnt_group = 0;
+$cnt_user = 0;
+$cnt_group = 0;
+$cnt_group_user = 0;
+$cnt_group_group = 0;
+$exists = false;
+
+/*handle remove, update and insert**************************************************************************************/
+if($insert){
+	if(count($selected_user)>0){
+		for($i=0; $i<count($selected_user); $i++){
+			$exists = false;
+			$sql = "SELECT * from mb_user_mb_group where fkey_mb_group_id = $1 AND fkey_mb_user_id = $2 AND mb_user_mb_group_type = $3";
+			$v = array($selected_group,$selected_user[$i],$authorizeRoleId);
+			$t = array('i','i','i');
+			$res_insert = db_prep_query($sql,$v,$t);
+
+			while(db_fetch_row($res_insert)){$exists = true;}
+			if($exists == false){
+				//allow the user to be a metadata editor
+				$sql = "INSERT INTO mb_user_mb_group(fkey_mb_group_id, fkey_mb_user_id, mb_user_mb_group_type) ";
+				$sql .= "VALUES($1, $2, $3)";
+
+				$v = array($selected_group,$selected_user[$i], $authorizeRoleId);
+				$t = array('i','i','i');
+				$res = db_prep_query($sql,$v,$t);
+			}
+		}
+	}
+}
+if($remove){
+	if(count($remove_user)>0){
+		for($i=0; $i<count($remove_user); $i++){
+			$sql_remove = "DELETE FROM mb_user_mb_group WHERE ";
+			$sql_remove .= "fkey_mb_user_id = $1 and fkey_mb_group_id = $2 AND mb_user_mb_group_type = $3";
+			$v = array($remove_user[$i],$selected_group, $authorizeRoleId);
+			$t = array('i','i','i');
+			db_prep_query($sql_remove,$v,$t);
+			//delete all references from owned services of this user to metadata point of contact 
+			$sql_wms_update = "UPDATE wms SET fkey_mb_group_id = 0 WHERE wms_owner = $1 AND fkey_mb_group_id = $2";
+			$v = array($remove_user[$i],$selected_group);
+			$t = array('i','i');
+			db_prep_query($sql_wms_update,$v,$t);
+			$sql_wfs_update = "UPDATE wfs SET fkey_mb_group_id = 0 WHERE wfs_owner = $1 AND fkey_mb_group_id = $2";
+			$v = array($remove_user[$i],$selected_group);
+			$t = array('i','i');
+			db_prep_query($sql_wfs_update,$v,$t);
+		}
+	}
+}
+
+
+
+/*get all user which have the right to load services and have assigned a primary group! **********************************************************************************************/
+$sql_user = "SELECT b.mb_user_id, b.mb_user_name, b.mb_group_name, b.mb_user_email FROM ( ";
+$sql_user .= "SELECT mb_group_name, mb_user_name, mb_user_email, mb_user_id , fkey_mb_group_id FROM ";
+$sql_user .= "(SELECT mb_user.mb_user_id, mb_user.mb_user_name, mb_user.mb_user_email, "; $sql_user .= "mb_user_mb_group.fkey_mb_group_id FROM ";
+$sql_user .= "mb_user_mb_group INNER JOIN mb_user ON ";
+$sql_user .= "mb_user_mb_group.fkey_mb_user_id = mb_user.mb_user_id WHERE ";
+$sql_user .= "mb_user_mb_group.mb_user_mb_group_type = 2 ) as a INNER JOIN ";
+$sql_user .= "mb_group ON mb_group.mb_group_id = a.fkey_mb_group_id  ";
+$sql_user .= ") AS b ";
+$sql_user .= "INNER JOIN mb_user_mb_group ON 	mb_user_mb_group.fkey_mb_user_id = b.mb_user_id WHERE mb_user_mb_group.fkey_mb_group_id = $1 ";
+
+$v = array($adminGroupId);
+$t = array('i');
+$res_user = db_prep_query($sql_user,$v,$t);
+
+while($row = db_fetch_array($res_user)){
+	$user_id[$cnt_user] = $row["mb_user_id"];
+	$user_name[$cnt_user] = $row["mb_group_name"]." - ".$row["mb_user_name"];
+	$user_email[$cnt_user] = $row["mb_user_email"];	
+	$cnt_user++;
+}
+
+/*get all user which are metadata editors for my primary group ******************************************************************************/
+$sql_mb_user_mb_group = "SELECT mb_group_name, mb_user_name, mb_user_email, mb_user_id  FROM ";
+$sql_mb_user_mb_group .= "(SELECT  mb_user_name, mb_user_email, mb_user_id, ";
+$sql_mb_user_mb_group .= "mb_user_mb_group.fkey_mb_group_id FROM (SELECT ";
+$sql_mb_user_mb_group .= "mb_user.mb_user_id, mb_user.mb_user_name, mb_user.mb_user_email, ";
+$sql_mb_user_mb_group .= "mb_user_mb_group.fkey_mb_group_id,mb_user_mb_group.mb_user_mb_group_type ";
+$sql_mb_user_mb_group .= "FROM mb_user_mb_group INNER JOIN mb_user ON ";
+$sql_mb_user_mb_group .= "mb_user_mb_group.fkey_mb_user_id = mb_user.mb_user_id ";
+$sql_mb_user_mb_group .= "WHERE (mb_user_mb_group.mb_user_mb_group_type = $2 ) ";
+$sql_mb_user_mb_group .= " AND mb_user_mb_group.fkey_mb_group_id = $1 ";
+$sql_mb_user_mb_group .= ") as a INNER JOIN mb_user_mb_group ON ";
+$sql_mb_user_mb_group .= "mb_user_mb_group.fkey_mb_user_id = a.mb_user_id WHERE ";
+$sql_mb_user_mb_group .= "mb_user_mb_group.mb_user_mb_group_type = 2 ";
+$sql_mb_user_mb_group .= ") as b , mb_group WHERE mb_group.mb_group_id = b.fkey_mb_group_id";
+
+$v = array($selected_group, $authorizeRoleId);
+$t = array('i','i');
+
+$res_mb_user_mb_group = db_prep_query($sql_mb_user_mb_group,$v,$t);
+
+while($row = db_fetch_array($res_mb_user_mb_group)){
+	$user_id_group[$cnt_group_user] = $row["mb_user_id"];
+	$user_name_group[$cnt_group_user] = $row["mb_group_name"]." - ".$row["mb_user_name"];
+	$user_email_group[$cnt_group_user] =  $row["mb_user_email"];
+	$cnt_group_user++;
+}
+
+
+/*INSERT HTML*/
+echo "<form name='form1' action='" . $self . "' method='post'>";
+/*filterbox*************************************************************************/
+echo "<input type='text' value='' class='filter2' id='filter2' name='filter2' onkeyup='filterUser(document.getElementById(\"selecteduser\"),user,this.value);'/>";
+/*insert all profiles in selectbox*****************************************************************/
+echo "<div class='text2'>"._mb("Registrating institutions").":</div>";
+echo "<select style='background:#ffffff' onchange='updateMail(this, user)' class='select2' multiple='multiple' id='selecteduser' name='selected_user[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_user; $i++){
+	echo "<option value='" . $user_id[$i]  . "' title='".$user_email[$i]."'>" . $user_name[$i]  . "</option>";
+}
+echo "</select>";
+
+/*Button****************************************************************************************************/
+
+echo "<div class='button1'><input type='button'  value='==>' onClick='validate(\"insert\")'></div>";
+echo "<input type='hidden' name='insert'>";
+
+echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+echo "<input type='hidden' name='remove'>";
+
+/*filterbox****************************************************************************************/
+echo "<input type='text' value='' class='filter3' id='filter3' name='filter3' onkeyup='filterUser(document.getElementById(\"removeuser\"),groupuser,this.value);'/>";
+/*insert container_profile_dependence and container_group_dependence in selectbox******************/
+echo "<div class='text3'>"._mb("My (metadata-)provider").":</div>";
+echo "<select style='background:#ffffff' onchange='updateMail(this, user)' class='select3' multiple='multiple' name='remove_user[]' id='removeuser' size='$fieldHeight' >";
+for($i=0; $i<$cnt_group_user; $i++){
+	echo "<option value='" . $user_id_group[$i]  . "' title='".$user_email_group[$i]."'>" . $user_name_group[$i]  . "</option>";
+}
+echo "</select>";
+
+echo "</form>";
+
+?>
+<script type="text/javascript">
+
+//document.forms[0].selected_group.focus();
+var user=[];
+<?php
+for($i=0; $i<$cnt_user; $i++){
+	echo "user[".$i."]=[];\n";
+	echo "user[".$i."]['id']='" . $user_id[$i]  . "';\n";
+	echo "user[".$i."]['name']='" . $user_name[$i]  . "';\n";
+	echo "user[".$i."]['email']='" . $user_email[$i]  . "';\n";
+}
+?>
+var groupuser=[];
+<?php
+for($i=0; $i<$cnt_group_user; $i++){
+	echo "groupuser[".$i."]=[];\n";
+	echo "groupuser[".$i."]['id']='" . $user_id_group[$i]  . "';\n";
+	echo "groupuser[".$i."]['name']='" . $user_name_group[$i]  . "';\n";
+	echo "groupuser[".$i."]['email']='" . $user_email_group[$i]  . "';\n";
+}
+?>
+
+</script>
+</body>
+</html>

Modified: branches/2.7/http/geoportal/mod_readOpenSearchResults.php
===================================================================
--- branches/2.7/http/geoportal/mod_readOpenSearchResults.php	2011-07-19 13:02:47 UTC (rev 7969)
+++ branches/2.7/http/geoportal/mod_readOpenSearchResults.php	2011-07-19 13:03:58 UTC (rev 7970)
@@ -342,7 +342,7 @@
 				
 
 
-				fwrite($os_catalogs_file_handle,urlencode($openSearchWrapperDetail."?osid=".$os_list[$i_si] ['id']."&plugid=".$plugid."&docid=".$docid."&mdtype=html"));
+				fwrite($os_catalogs_file_handle,urlencode($openSearchWrapperDetail."?osid=".$os_list[$i_si] ['id']."&plugid=".$plugid."&docid=".$docid."&docuuid=".$docuuid."&mdtype=html"));
 
 				fwrite($os_catalogs_file_handle,"</catalogtitlelink>\n");
 				#Tags for objecttitle and abstract
@@ -396,10 +396,10 @@
 				}
 				#fwrite($os_catalogs_file_handle,"");
 				fwrite($os_catalogs_file_handle,"<iso19139url>");
-				fwrite($os_catalogs_file_handle,urlencode($openSearchWrapperDetail."?osid=".$os_list[$i_si] ['id']."&plugid=".$plugid."&docid=".$docid."&mdtype=iso19139"));
+				fwrite($os_catalogs_file_handle,urlencode($openSearchWrapperDetail."?osid=".$os_list[$i_si] ['id']."&plugid=".$plugid."&docid=".$docid."&docuuid=".$docuuid."&mdtype=iso19139"));
 				fwrite($os_catalogs_file_handle,"</iso19139url>\n");
 				fwrite($os_catalogs_file_handle,"<inspireurl>");
-				fwrite($os_catalogs_file_handle,urlencode($openSearchWrapperDetail."?osid=".$os_list[$i_si] ['id']."&plugid=".$plugid."&docid=".$docid."&mdtype=inspire"));
+				fwrite($os_catalogs_file_handle,urlencode($openSearchWrapperDetail."?osid=".$os_list[$i_si] ['id']."&plugid=".$plugid."&docid=".$docid."&docuuid=".$docuuid."&mdtype=iso19139&validate=true"));
 				fwrite($os_catalogs_file_handle,"</inspireurl>\n");
 				#end of resultlist
 				fwrite($os_catalogs_file_handle,"</result>\n");

Modified: branches/2.7/http/geoportal/mod_readOpenSearchResultsDetail.php
===================================================================
--- branches/2.7/http/geoportal/mod_readOpenSearchResultsDetail.php	2011-07-19 13:02:47 UTC (rev 7969)
+++ branches/2.7/http/geoportal/mod_readOpenSearchResultsDetail.php	2011-07-19 13:03:58 UTC (rev 7970)
@@ -1,515 +1,706 @@
 <?php
 #http://localhost/mapbender/geoportal/mod_readOpenSearchResultsDetail.php?osid=1&...
 require_once(dirname(__FILE__)."/../../core/globalSettings.php");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-#function logit($text){
-	 	#if($h = fopen("/home/armin/Desktop/opensearch_log.txt","a")){
-				#	$content = $text .chr(13).chr(10);
-				#	if(!fwrite($h,$content)){
-				#		#exit;
-				#	}
-				#	fclose($h);
-				#}
-	# }
-
-#require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+#$con = db_connect(DBSERVER,OWNER,PW);
+#db_select_db(DB,$con);
 require_once(dirname(__FILE__)."/../classes/class_connector.php");
-function display_text($string) {
-    $string = eregi_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href=\"\\0\" target=_blank>\\0</a>", $string);   
-    $string = eregi_replace("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@([0-9a-z](-?[0-9a-z])*\.)+[a-z]{2}([zmuvtg]|fo|me)?$", "<a href=\"mailto:\\0\" target=_blank>\\0</a>", $string);   
-    $string = eregi_replace("\n", "<br>", $string);
-    return $string;
-}  
+require_once dirname(__FILE__) . "/../../tools/wms_extent/extent_service.conf";
+$languageCode = "de";
+$layout = "tabs";
+//get language parameter out of mapbender session if it is set else set default language to de_DE
+if (isset($_SESSION['mb_lang']) && ($_SESSION['mb_lang']!='')) {
+	$e = new mb_notice("mod_readOpenSearchResultsDetail.php: language found in session: ".$_SESSION['mb_lang']);
+	$language = $_SESSION["mb_lang"];
+	$langCode = explode("_", $language);
+	$langCode = $langCode[0]; # Hopefully de or s.th. else
+	$languageCode = $langCode; #overwrite the GET Parameter with the SESSION information
+}
 
+if (isset($_REQUEST["languageCode"]) & $_REQUEST["languageCode"] != "") {
+	//validate to csv integer list
+	$testMatch = $_REQUEST["languageCode"];
+	if (!($testMatch == 'de' or $testMatch == 'fr' or $testMatch == 'en')){ 
+		echo 'languageCode: <b>'.$testMatch.'</b> is not valid.<br/>'; 
+		die(); 		
+ 	}
+	$languageCode = $testMatch;
+	$testMatch = NULL;
+}
 
-#***
+if(!isset($_REQUEST["osid"])) {
+	echo "no opensearch id set";
+	die();
+} else {
+	#if(isset($_REQUEST["mdtype"])&($_REQUEST["mdtype"]=='debug') ) {	
+	#	echo "opensearch interface no.: ".$_REQUEST["osid"]." will be requested<br>";
+	#}
+}
 
-	$md_ident=array(
-		array(	ibus => "object_node.fk_obj_uuid",
-			iso19139 => "MD_Metadata.parentIdentifier",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Identifikator des übergeordneten Objektes",
-			gdescription => ""),
-		array(	ibus => "t01_object",
-			iso19139 => "MD_Metadata.fileIdentifier",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Objectidentifikator",
-			gdescription => ""),
-		array(	ibus => "t01_object.obj_name",
-			iso19139 => "MD_Metadata.identificationInfo?",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Objektname",
-			gdescription => ""),
-		array(	ibus => "t01_object.obj_class",
-			iso19139 => "",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "ID der Objektklasse",
-			gdescription => "Relevant sind 1 und 3"),
-		array(	ibus => "t01_object.info_note",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.purpose",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Herstellungszweck",
-			gdescription => "Zusatzinformation"),
-		array(	ibus => "t01_object.loc_descr",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.extent.description",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Raumbezug:Erläuterung",
-			gdescription => "Raumbezug"),
-		array(	ibus => "t01_object.time_from",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.extent.EX_Extent.temporalElement.EX_TemporalExtent.....",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Zeitbezug des Dateninhalts von:",
-			gdescription => "Zeitbezug"),
-		array(	ibus => "t01_object.time_to",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.extent.EX_Extent.temporalElement.EX_TemporalExtent.....",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Zeitbezug des Dateninhalts bis:",
-			gdescription => "Zeitbezug"),
-	array(	ibus => "t011_obj_literatur.base",
-			iso19139 => "MD_Metadata.identificationInfo.MD_Identification.descriptiveKeywords.MD_Keywords.keyword",
-			iso19139explode => "true" ,
-			inspire => "B 3.1 Keyword value",
-			inspiremandatory => "true",
-			iso_name => "descriptive Keywords",
-			html => "INSPIRE Thema",
-			gdescription => ""),
+if(!isset($_REQUEST["docuuid"])) {
+	echo "No uuid of dataset given!";
+	die();
+} else {
+	$docuuid = $_REQUEST["docuuid"];
+}
 
+function getExtentGraphic($layer_4326_box) {
+		$rlp_4326_box = array(6.05,48.9,8.6,50.96);
+		if ($layer_4326_box[0] <= $rlp_4326_box[0] || $layer_4326_box[2] >= $rlp_4326_box[2] || $layer_4326_box[1] <= $rlp_4326_box[1] || $layer_4326_box[3] >= $rlp_4326_box[3]) {
+			if ($layer_4326_box[0] < $rlp_4326_box[0]) {
+				$rlp_4326_box[0] = $layer_4326_box[0]; 
+			}
+			if ($layer_4326_box[2] > $rlp_4326_box[2]) {
+				$rlp_4326_box[2] = $layer_4326_box[2]; 
+			}
+			if ($layer_4326_box[1] < $rlp_4326_box[1]) {
+				$rlp_4326_box[1] = $layer_4326_box[1]; 
+			}
+			if ($layer_4326_box[3] > $rlp_4326_box[3]) {
+				$rlp_4326_box[3] = $layer_4326_box[3]; 
+			}
 
+			$d_x = $rlp_4326_box[2] - $rlp_4326_box[0]; 
+			$d_y = $rlp_4326_box[3] - $rlp_4326_box[1];
+			
+			$new_minx = $rlp_4326_box[0] - 0.05*($d_x);
+			$new_maxx = $rlp_4326_box[2] + 0.05*($d_x);
+			$new_miny = $rlp_4326_box[1] - 0.05*($d_y);
+			$new_maxy = $rlp_4326_box[3] + 0.05*($d_y);
 
-		array(	ibus => "t04_search.searchterm",
-			iso19139 => "MD_Metadata.identificationInfo.MD_Identification.descriptiveKeywords.MD_Keywords.keyword",
-			iso19139explode => "true" ,
-			inspire => "B 3.1 Keyword value",
-			inspiremandatory => "true",
-			iso_name => "descriptive Keywords",
-			html => "Suchbegriffe",
-			gdescription => ""),
-		array(	ibus => "title",
-			iso19139 => "identificationInfo[1]/*/citation/*/title",
-			iso19139explode => "false" ,
-			inspire => "B 1.1 Resource title",
-			inspiremandatory => "true",
-			iso_name => "Title",
-			html => "Titel",
-			gdescription => ""),
+			if ($new_minx < -180) $rlp_4326_box[0] = -180; else $rlp_4326_box[0] = $new_minx;
+			if ($new_maxx > 180) $rlp_4326_box[2] = 180; else $rlp_4326_box[2] = $new_maxx;
+			if ($new_miny < -90) $rlp_4326_box[1] = -90; else $rlp_4326_box[1] = $new_miny;
+			if ($new_maxy > 90) $rlp_4326_box[3] = 90; else $rlp_4326_box[3] = $new_maxy;
+		}
+		$getMapUrl = EXTENTSERVICEURL."VERSION=1.1.1&REQUEST=GetMap&SERVICE=WMS&LAYERS=".EXTENTSERVICELAYER."&STYLES=&SRS=EPSG:4326&BBOX=".$rlp_4326_box[0].",".$rlp_4326_box[1].",".$rlp_4326_box[2].",".$rlp_4326_box[3]."&WIDTH=120&HEIGHT=120&FORMAT=image/png&BGCOLOR=0xffffff&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage&minx=".$layer_4326_box[0]."&miny=".$layer_4326_box[1]."&maxx=".$layer_4326_box[2]."&maxy=".$layer_4326_box[3];
+		return $getMapUrl;
+}
 
-		array(	ibus => "t0113_dataset_reference.reference_date",
-			iso19139 => "",
-			iso19139explode => "false" ,
-			inspire => "B 5.2 Date of publication",
-			inspiremandatory => "true",
-			iso_name => "Date of publication",
-			html => "Veröffentlichungsdatum",
-			gdescription => ""),
 
-		array(	ibus => "t01_object.time_status",
-			iso19139 => "",
-			iso19139explode => "false" ,
-			inspire => "B 5.3 Date of revision",
-			inspiremandatory => "true",
-			iso_name => "Date of revision",
-			html => "Datum der letzten Überarbeitung",
-			gdescription => ""),
 
-		array(	ibus => "txx", #to find
-			iso19139 => "",
-			iso19139explode => "false" ,
-			inspire => "B 5.4 Date of creation",
-			inspiremandatory => "true",
-			iso_name => "Date of creation",
-			html => "Erzeugungsdatum",
-			gdescription => ""),
+function display_text($string) {
+    $string = eregi_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href=\"\\0\" target=_blank>\\0</a>", $string);   
+    $string = eregi_replace("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@([0-9a-z](-?[0-9a-z])*\.)+[a-z]{2}([zmuvtg]|fo|me)?$", "<a href=\"mailto:\\0\" target=_blank>\\0</a>", $string);   
+    $string = eregi_replace("\n", "<br>", $string);
+    return $string;
+} 
+ 
+function guid(){
+    if (function_exists('com_create_guid')){
+        return com_create_guid();
+    }else{
+        mt_srand((double)microtime()*10000);//optional for php 4.2.0 and up.
+        $charid = strtoupper(md5(uniqid(rand(), true)));
+        $hyphen = chr(45);// "-"
+        $uuid = chr(123)// "{"
+                .substr($charid, 0, 8).$hyphen
+                .substr($charid, 8, 4).$hyphen
+                .substr($charid,12, 4).$hyphen
+                .substr($charid,16, 4).$hyphen
+                .substr($charid,20,12)
+                .chr(125);// "}"
+        return $uuid;
+    }
+}
 
-		array(	ibus => "summary",
-			iso19139 => "identificationInfo[1]/*/abstract",
-			iso19139explode => "false" ,
-			inspire => "B 1.2 Resource abstract",
-			inspiremandatory => "true",
-			iso_name => "abstract",
-			html => "Zusammenfassung",
-			gdescription => ""),
-		array(	ibus => "t011_obj_serv.type",
-			iso19139 => "MD_Metadata.identificationInfo.SV_ServiceIdentification.serviceType",
-			iso19139explode => "false" ,
-			inspire => "B 2.2 Spatial data service type",
-			inspiremandatory => "true",
-			iso_name => "ServiceType",
-			html => "Typ des Dienstes",
-			gdescription => ""),
-		array(	ibus => "t011_obj_serv_version.version",
-			iso19139 => "MD_Metadata.identificationInfo.SV_ServiceIdentification.serviceTypeVersion",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "Service Type Version",
-			html => "Version des Dienstes",
-			gdescription => ""),
-		array(	ibus => "x1",
-	//array(	ibus => "spatial_ref_value.x1",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.extent.EX_GeographicBoundingBox.WestBoundLongitude",
-			iso19139explode => "false" ,
-			inspire => "B 4.1 Geographic bounding box - western longitude",
-			inspiremandatory => "true",
-			iso_name => "WestBoundLongitude",
-			html => "Westliche Begrenzung (geographische Länge)",
-			gdescription => ""),
-		array(	ibus => "y1",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.extent.EX_GeographicBoundingBox.SouthBoundLatitude",
-			iso19139explode => "false" ,
-			inspire => "B 4.1 Geographic bounding box - southern latitude",
-			inspiremandatory => "true",
-			iso_name => "SouthBoundLatitude",
-			html => "Südliche Begrenzung (geographische Breite)",
-			gdescription => ""),
-		array(	ibus => "x2",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.extent.EX_GeographicBoundingBox.EastBoundLongitude",
-			iso19139explode => "false" ,
-			inspire => "B 4.1 Geographic bounding box - eastern longitude",
-			inspiremandatory => "true",
-			iso_name => "EastBoundLongitude",
-			html => "Östliche Begrenzung (geographische Länge)",
-			gdescription => ""),
-		array(	ibus => "y2",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.extent.EX_GeographicBoundingBox.NorthBoundLatitude",
-			iso19139explode => "false" ,
-			inspire => "B 4.1 Geographic bounding box - northern latitude",
-			inspiremandatory => "true",
-			iso_name => "NorthBoundLatitude",
-			html => "Nördliche Begrenzung (geographische Breite)",
-			gdescription => ""),
-		array(	ibus => "t01_object.metadata_language",
-			iso19139 => "MD_Metadata.language",
-			iso19139explode => "false" ,
-			inspire => "B 10.3 Metadata language",
-			inspiremandatory => "true",
-			iso_name => "Metadata language",
-			html => "Sprache des Metadatensatzes",
-			gdescription => ""),
-		array(	ibus => "summary",
-			iso19139 => "MD_Metadata.identificationInfo.MD_Identification.citation.CI_Citation.alternateTitle",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "Dataset alternate title",
-			html => "Kurzbezeichnung",
-			gdescription => ""),
-		array(	ibus => "t011_object_geo.special_base",
-			iso19139 => "MD_Metadata.dataQualityInfo.lineage.LI_Lineage.statement",
-			iso19139explode => "false" ,
-			inspire => "B 6.1 Lineage",
-			inspiremandatory => "true",
-			iso_name => "B 1.6 Lineage",
-			html => "Informationen zum Herstellungsprozess",
-			gdescription => ""),
-		array(	ibus => "t011_object_geo.rec_exact",
-			iso19139 => "MD_Metadata.dataQualityInfo.lineage.DQ_DataQuality.report.DQ_RelativeInternalPositionAccuracy.value",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Fachliche Grundlage",
-			gdescription => ""),
-		array(	ibus => "t011_object_geo_scale.scale",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.spatialResolution.MD_Resolution.equivalentScale.MD_RepresentativeFraction.denominator",
-			iso19139explode => "false" ,
-			inspire => "B 6.2 Spatial Resolution",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Erstellungsmaßstab->Maßstab",
-			gdescription => ""),
-		array(	ibus => "t011_object_geo_scale.resolution_ground",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.spatialResolution.MD_Resolution.distance",
-			iso19139explode => "false" ,
-			inspire => "B 6.2 Spatial Resolution",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Erstellungsmaßstab->Bodenauflösung",
-			gdescription => ""),
+//function to validate against the inspire validation service
+function validateInspireMetadataFromData($iso19139Xml){
+	$validatorUrl = 'http://www.inspire-geoportal.eu/INSPIREValidatorService/resources/validation/inspire';
+	#$validatorUrl2 = 'http://localhost/mapbender/x_geoportal/log_requests.php'; //for debugging purposes
+	//send inspire xml to validator and push the result to requesting user
+	$validatorInterfaceObject = new connector();
+	$validatorInterfaceObject->set('httpType','POST');
+	$validatorInterfaceObject->set('httpContentType','multipart/form-data'); # maybe given automatically
+	//first test with data from ram - doesn't function :-(
+	$fields = array(
+		'dataFile'=>urlencode($iso19139Xml)
+		);
+	//generate file identifier:
+	$fileId = guid();
+	//generate temporary file under tmp
+	 if($h = fopen(TMPDIR."/".$fileId."iso19139_validate_tmp.xml","w")){
+		if(!fwrite($h,$iso19139Xml)){
+			$e = new mb_exception("geoportal/mod_readOpenSearchResultsDetail.php: cannot write to file: ".TMPDIR."iso19139_validate_tmp.xml");
+		}
+	fclose($h);
+	}
+	//send file as post like described under http://www.tecbrat.com/?itemid=13&catid=1
+	$fields['dataFile']='@'.TMPDIR.'/'.$fileId.'iso19139_validate_tmp.xml';
+	$postData = $fields;
+	$validatorInterfaceObject->set('httpPostFieldsNumber',count($postData));
+	$validatorInterfaceObject->set('curlSendCustomHeaders',false);
+	$validatorInterfaceObject->set('httpPostData', $postData); #give an array
+	$validatorInterfaceObject->load($validatorUrl);
+	header("Content-type: text/html; charset=UTF-8");
+	echo $validatorInterfaceObject->file;
+	//delete file in tmp 
+	//TODO - this normally done by a cronjob
+	die();
+}
 
-#The resolutions for services will be hold in different objects!
-		array(	ibus => "t011_object_serv_scale.scale",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.spatialResolution.MD_Resolution.equivalentScale.MD_RepresentativeFraction.denominator",
-			iso19139explode => "false" ,
-			inspire => "B 6.2 Spatial Resolution",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Erstellungsmaßstab->Maßstab",
-			gdescription => "Auflösung bei Diensten"),
-		array(	ibus => "t011_object_serv_scale.resolution_ground",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.spatialResolution.MD_Resolution.distance",
-			iso19139explode => "false" ,
-			inspire => "B 6.2 Spatial Resolution",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Erstellungsmaßstab->Bodenauflösung",
-			gdescription => "Auflösung bei Diensten"),
+//INSPIRE Mapping
+$md_ident = array(
+//Metadata Identifier - not neccessary?
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:fileIdentifier/gco:CharacterString",
+		iso19139explode => "false" ,
+		inspire => "unique resource identifier",
+		inspiremandatory => "false",
+		iso_name => "fileIdentifier",
+		html => _mb("Metadata identifier"),
+		value => "",
+		category => "identification",
+		description => _mb("A value uniquely identifying the resource. The value domain of this metadata element is a mandatory character string code, generally assigned by the data owner, and a character string namespace uniquely identifying the context of the identifier code (for example, the data owner).")
+	),
+//B 1.1
+	array(	ibus => "rtitle",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString",
+		iso19139explode => "false" ,
+		inspire => "resource title",
+		inspiremandatory => "true",
+		iso_name => "type",
+		html => _mb("Resource title"),
+		value => "",
+		category => "identification",
+		description => _mb("This a characteristic, and often unique, name by which the resource is known. The value domain of this metadata element is free text.")
+	),
+//B 1.2
+	array(	ibus => "abstract",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:abstract/gco:CharacterString",
+		iso19139explode => "false" ,
+		inspire => "resource abstract",
+		inspiremandatory => "true",
+		iso_name => "description",
+		html => _mb("Resource abstract"),
+		value => "",
+		category => "identification",
+		description => _mb("This is a brief narrative summary of the content of the resource.")
+	),
+//B 1.3
+	array(	ibus => "rtype",
+		iso19139 => "/gmd:MD_Metadata/gmd:hierarchyLevel/gmd:MD_ScopeCode/@codeListValue",
+		iso19139explode => "false" ,
+		inspire => "resource type",
+		inspiremandatory => "true",
+		iso_name => "type",
+		html => _mb("Resource type"),
+		value => "",
+		category => "identification",
+		description => _mb("This is the type of resource being described by the metadata.")
+	),
+//B 1.4
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:linkage/gmd:URL",
+		iso19139explode => "false" ,
+		inspire => "unique resource locator",
+		inspiremandatory => "true",
+		iso_name => "resourceLocator",
+		html => _mb("Resource locator"),
+		value => "",
+		category => "identification",
+		description => _mb("The resource locator defines the link(s) to the resource and/or the link to additional information about the resource. The value domain of this metadata element is a character string, commonly expressed as uniform resource locator (URL).")
+	),
+//B 1.5 - Identifier of dataset!
+//Part 1 id
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:RS_Identifier/gmd:code/gco:CharacterString",
+		iso19139explode => "false" ,
+		inspire => "unique resource identifier namespace",
+		inspiremandatory => "true",
+		iso_name => "dataset id",
+		html => _mb("Unique resource identifier id"),
+		value => "",
+		category => "identification",
+		description => _mb("A value uniquely identifying the resource. The value domain of this metadata element is a mandatory character string code, generally assigned by the data owner.")
+	),
+//Part 2 - namespace
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:RS_Identifier/gmd:codeSpace/gco:CharacterString",
+		iso19139explode => "false" ,
+		inspire => "unique resource identifier namespace",
+		inspiremandatory => "true",
+		iso_name => "dataset namespace",
+		html => _mb("Unique resource identifier namespace"),
+		value => "",
+		category => "identification",
+		description => _mb("A character string namespace uniquely identifying the context of the identifier code (for example, the data owner)")
+	),
+//B 1.6 Coupled resource
+//NOTICE: simplexml has problems with namespaced attributes! So we choose a alias for xlink:href which is xlinkhref and exchange this attributes from xml before parsing the xml!
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/srv:operatesOn/@xlinkhref",
+		iso19139explode => "false" ,
+		inspire => "coupled resource",
+		inspiremandatory => "true",
+		iso_name => "coupled resource",
+		html => _mb("Coupled resource"),
+		value => "",
+		category => "identification",
+		description => _mb("If the resource is a spatial data service, this metadata element identifies, where relevant, the target spatial data set(s) of the service through their unique resource identifiers (URI). The value domain of this metadata element is a mandatory character string code, generally assigned by the data owner, and a character string namespace uniquely identifying the context of the identifier code (for example, the data owner).")
+	),
+//B 1.7 Language dataset
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:language/gmd:LanguageCode/@codeListValue",
+		iso19139explode => "false" ,
+		inspire => "Language",
+		inspiremandatory => "true",
+		iso_name => "language",
+		html => _mb("Language"),
+		value => "",
+		category => "identification",
+		description => _mb("The language(s) used within the resource. The value domain of this metadata element is limited to the languages defined in ISO 639-2.")
+	),
+//B 2.1 Topic category
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:topicCategory/gmd:MD_TopicCategoryCode",
+		iso19139explode => "true" ,
+		inspire => "topic category",
+		inspiremandatory => "true",
+		iso_name => "topic category",
+		html => _mb("Topic category"),
+		value => "",
+		category => "classification",
+		description => _mb("The topic category is a high-level classification scheme to assist in the grouping and topic-based search of available spatial data resources. The value domain of this metadata element is defined in Part D.2.")
+	),
+//B 2.2 Spatial data service type
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/srv:SV_ServiceIdentification/srv:serviceType/gco:LocalName",
+		iso19139explode => "false" ,
+		inspire => "spatial data service type",
+		inspiremandatory => "true",
+		iso_name => "topic category",
+		html => _mb("Spatial data service type"),
+		value => "",
+		category => "classification",
+		description => _mb("This is a classification to assist in the search of available spatial data services. A specific service shall be categorised in only one category. The value domain of this metadata element is defined in Part D.3.")
+	),
+//B3 Keyword
+//B 3.1 keyword value dataset
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword/gco:CharacterString",
+		iso19139explode => "true" ,
+		inspire => "keyword value",
+		inspiremandatory => "true",
+		iso_name => "keywordValue",
+		html => _mb("Keyword value"),
+		value => "",
+		category => "keyword",
+		description => _mb("If the resource is a spatial data service, at least one keyword from Part D.4 shall be provided. If a resource is a spatial data set or spatial data set series, at least one keyword shall be provided from the general environmental multilingual thesaurus (GEMET) describing the relevant spatial data theme as defined in Annex I, II or III to Directive 2007/2/EC.")
+	),
+//B 4 Geographic Location
+//B 4.1 Geographic bounding box
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/*/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/*/gco:Decimal",
+		iso19139explode => "true" ,
+		inspire => "geographic bounding box",
+		inspiremandatory => "true",
+		iso_name => "geographic bounding box",
+		html => _mb("Geographic bounding box"),
+		value => "",
+		category => "location",
+		description => _mb("This is the extent of the resource in the geographic space, given as a bounding box. The bounding box shall be expressed with westbound and eastbound longitudes, and southbound and northbound latitudes in decimal degrees, with a precision of at least two decimals.")
+	),
+//B 5. Temporal reference
+//B 5.1 Temporal extent
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_EX_TemporalExtent/gmd:extent/gml:TimePeriod/*",
+		iso19139explode => "false" ,
+		inspire => "temporal extent",
+		inspiremandatory => "false",
+		iso_name => "Temporal extent",
+		html => _mb("Temporal extent"),
+		value => "",
+		category => "actuality",
+		description => _mb("The temporal extent defines the time period covered by the content of the resource. This time period may be expressed as any of the following: - an individual date, - an interval of dates expressed through the starting date and end date of the interval, - a mix of individual dates and intervals of dates.")
+	),
+//B 5.2 Date of publication
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date[gmd:dateType/gmd:CI_DateTypeCode/@codeListValue='publication']/gmd:date/*",
+		iso19139explode => "false" ,
+		inspire => "date of publication",
+		inspiremandatory => "true",
+		iso_name => "date of publication",
+		html => _mb("Date of publication"),
+		value => "",
+		category => "actuality",
+		description => _mb("This is the date of publication of the resource when available, or the date of entry into force. There may be more than one date of publication.")
+	),
+//B 5.3 Date of last revision
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date[gmd:dateType/gmd:CI_DateTypeCode/@codeListValue='revision']/gmd:date/*",
+		iso19139explode => "false" ,
+		inspire => "date of last revision",
+		inspiremandatory => "true",
+		iso_name => "date of last revision",
+		html => _mb("Date of last revision"),
+		value => "",
+		category => "actuality",
+		description => _mb("This is the date of last revision of the resource, if the resource has been revised. There shall not be more than one date of last revision.")
+	),
+//B 5.4 Date of creation
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date[gmd:dateType/gmd:CI_DateTypeCode/@codeListValue='creation']/gmd:date/*",
+		iso19139explode => "false" ,
+		inspire => "date of creation",
+		inspiremandatory => "true",
+		iso_name => "date of creation",
+		html => _mb("Date of creation"),
+		value => "",
+		category => "actuality",
+		description => _mb("This is the date of creation of the resource. There shall not be more than one date of creation.")
+	),
+//B 6. Quality and validity
+//B 6.1 Lineage
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:lineage/gmd:LI_Lineage/gmd:statement/gco:CharacterString",
+		iso19139explode => "false" ,
+		inspire => "lineage",
+		inspiremandatory => "true",
+		iso_name => "lineage",
+		html => _mb("Lineage"),
+		value => "",
+		category => "quality",
+		description => _mb("This is a statement on process history and/or overall quality of the spatial data set. Where appropriate it may include a statement whether the data set has been validated or quality assured, whether it is the official version (if multiple versions exist), and whether it has legal validity.")
+	),
 
-		array(	ibus => "t011_obj_geo_spatial_rep",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.spatialRepresentationType.MD_SpatialRepresentationTypeCode",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Digitale Repräsentation",
-			gdescription => ""),
+//B 6.2 Spatial Resolution
+//B 6.2.1 equivalent scale 
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialResolution/gmd:MD_Resolution/gmd:equivalentScale/gmd:MD_RepresentativeFraction/gmd:denominator/gco:Integer",
+		iso19139explode => "false" ,
+		inspire => "equivalent scale",
+		inspiremandatory => "true",
+		iso_name => "equivalent scale",
+		html => _mb("Equivalent scale"),
+		value => "",
+		category => "resolution",
+		description => _mb("An equivalent scale is generally expressed as an integer value expressing the scale denominator.")
+	),
+//B 6.2.2 ground distance
+//B 6.2.2.1 ground distance value
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialResolution/gmd:MD_Resolution/gmd:distancegco:Distance",
+		iso19139explode => "false" ,
+		inspire => "ground distance value",
+		inspiremandatory => "true",
+		iso_name => "groundDistanceValue",
+		html => _mb("Ground Distance Value"),
+		value => "",
+		category => "resolution",
+		description => _mb("A resolution distance shall be expressed as a numerical value associated with a unit of length.")
+	),
+//B 6.2.2.1 ground distance value
+//TODO maybe everytime m? or parse the href ...
+//B 7. Conformity
+//B 7.1. Specification
+//B 7.1.1 Title
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:dataQualityInfo/gmd:DQ_DataQuality/gmd:report/gmd:DQ_DomainConsistency/gmd:result/gmd:DQ_ConformanceResult/gmd:specification/gmd:CI_Citation/gmd:title/gco:CharacterString",
+		iso19139explode => "false" ,
+		inspire => "Specification title",
+		inspiremandatory => "true",
+		iso_name => "Specification title",
+		html => _mb("Specification title"),
+		value => "",
+		category => "quality",
+		description => _mb("This is a citation of the implementing rules adopted under Article 7(1) of Directive 2007/2/EC or other specification to which a particular resource conforms. A resource may conform to more than one implementing rules adopted under Article 7(1) of Directive 2007/2/EC or other specification. This citation shall include at least the title and a reference date (date of publication, date of last revision or of creation) of the implementing rules adopted under Article 7(1) of Directive 2007/2/EC or of the specification.")
+	),
+//B 7.1.2 Reference Date
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:dataQualityInfo/gmd:DQ_DataQuality/gmd:report/gmd:DQ_DomainConsistency/gmd:result/gmd:DQ_ConformanceResult/gmd:specification/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date/*",
+		iso19139explode => "false" ,
+		inspire => "specification reference date",
+		inspiremandatory => "true",
+		iso_name => "Specification reference date",
+		html => _mb("Specification reference date"),
+		value => "",
+		category => "quality",
+		description => _mb("This is a citation of the implementing rules adopted under Article 7(1) of Directive 2007/2/EC or other specification to which a particular resource conforms. A resource may conform to more than one implementing rules adopted under Article 7(1) of Directive 2007/2/EC or other specification. This citation shall include at least the title and a reference date (date of publication, date of last revision or of creation) of the implementing rules adopted under Article 7(1) of Directive 2007/2/EC or of the specification.")
+	),
+//B 7.2. Degree
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:dataQualityInfo/gmd:DQ_DataQuality/gmd:report/gmd:DQ_DomainConsistency/gmd:result/gmd:DQ_ConformanceResult/gmd:pass/gco:Boolean",
+		iso19139explode => "false" ,
+		inspire => "deegree of conformance",
+		inspiremandatory => "true",
+		iso_name => "Degree of conformance",
+		html => _mb("Degree of conformance"),
+		value => "",
+		category => "quality",
+		description => _mb("This is the degree of conformity of the resource to the implementing rules adopted under Article 7(1) of Directive 2007/2/EC or other specification. The value domain of this metadata element is defined in Part D.")
+	),
+//B 8. Constraints related to access and use
+//B 8.1. Conditions applying to access and use
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:resourceConstraints/gmd:MD_Constraints/gmd:useLimitation/gco:CharacterString",
+		iso19139explode => "false" ,
+		inspire => "conditions applying to access and use",
+		inspiremandatory => "true",
+		iso_name => "conditions applying to access and use",
+		html => _mb("Conditions applying to access and use"),
+		value => "",
+		category => "useconstraints",
+		description => _mb("A set of conditions applying to access and use.")
+	),
+//B 8.2. Limitations on public access
+//B 8.2.1 access constraints codelist
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:resourceConstraints/gmd:MD_LegalConstraints/gmd:accessConstraints/gmd:MD_RestrictionCode/@codeListValue",
+		iso19139explode => "false" ,
+		inspire => "access constraints code",
+		inspiremandatory => "true",
+		iso_name => "access constraints code",
+		html => _mb("Access constraints code"),
+		value => "",
+		category => "useconstraints",
+		description => _mb("Code for access constraints")
+	),
 
+//B 8.2.2 other constraints
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:resourceConstraints/gmd:MD_LegalConstraints/gmd:otherConstraints/gco:CharacterString",
+		iso19139explode => "false" ,
+		inspire => "other constraints",
+		inspiremandatory => "true",
+		iso_name => "other constraints",
+		html => _mb("Other constraints"),
+		value => "",
+		category => "useconstraints",
+		description => _mb("Other constraints")
+	),
+//B 9. Organisations responsible for the establishment, management, maintance and distribution of spatial data sets and services
+//B 9.1. Responsible party
+//B 9.1.1 Responsible party name
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString",
+		iso19139explode => "false" ,
+		inspire => "responsible party name",
+		inspiremandatory => "true",
+		iso_name => "responsible party name",
+		html => _mb("Responsible party name"),
+		value => "",
+		category => "contact",
+		description => _mb("The name of the organisation as free text.")
+	),
+//B 9.1.2 Responsible party email
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString",
+		iso19139explode => "false" ,
+		inspire => "responsible party email",
+		inspiremandatory => "true",
+		iso_name => "responsible party email",
+		html => _mb("Responsible party email"),
+		value => "",
+		category => "contact",
+		description => _mb("A contact e-mail address as a character string.")
+	),
+//B 9.2 Responsible party role
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:role/gmd:CI_RoleCode/@codeListValue",
+		iso19139explode => "false" ,
+		inspire => "responsible party role",
+		inspiremandatory => "true",
+		iso_name => "responsible party role",
+		html => _mb("Responsible party role"),
+		value => "",
+		category => "contact",
+		description => _mb("This is the role of the responsible organisation. The value domain of this metadata element is defined in Part D.")
+	),
+//TODO some more translations
+//B 10 Metadata on metadata
+//B 10.1. Metadata point of contact
+//B 10.1.1 Metadata point of contact name
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:contact/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString",
+		iso19139explode => "false" ,
+		inspire => "metadata point of contact name",
+		inspiremandatory => "true",
+		iso_name => "Metadata point of contact name",
+		html => _mb("Metadata point of contact name"),
+		value => "",
+		category => "contact",
+		description => _mb("The name of the organisation as free text.")
+	),
+//B 10.1.2 Metadata point of contact email
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:contact/gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString",
+		iso19139explode => "false" ,
+		inspire => "metadata point of contact email",
+		inspiremandatory => "true",
+		iso_name => "Metadata point of contact email",
+		html => _mb("Metadata point of contact email"),
+		value => "",
+		category => "contact",
+		description => _mb("A contact e-mail address as a character string.")
+	),
+//B 10.2. Metadata date
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:dateStamp/*",
+		iso19139explode => "false" ,
+		inspire => "metadata date",
+		inspiremandatory => "true",
+		iso_name => "Metadata date",
+		html => _mb("Metadata date"),
+		value => "",
+		category => "metadata",
+		description => _mb("The date which specifies when the metadata record was created or updated. This date shall be expressed in conformity with ISO 8601.")
+	),
+//B 10.3. Metadata language
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:language/gmd:LanguageCode/@codeListValue",
+		iso19139explode => "false" ,
+		inspire => "metadata language",
+		inspiremandatory => "true",
+		iso_name => "Metadata language",
+		html => _mb("Metadata language"),
+		value => "",
+		category => "metadata",
+		description => _mb("This is the language in which the metadata elements are expressed. The value domain of this metadata element is limited to the official languages of the Community expressed in conformity with ISO 639-2.")
+	),
 
+//Additional Metadata Elements from the Data Specs
+//Metadata required for interoperability
+//TODO!!
+/*
+https://geo-ide.noaa.gov/wiki/index.php?title=ISO_Boilerplate
+<gmd:referenceSystemInfo>
+    <gmd:MD_ReferenceSystem>
+        <gmd:referenceSystemIdentifier>
+            <gmd:RS_Identifier>
+                <gmd:authority>
+                    <gmd:CI_Citation>
+                        <gmd:title>
+                            <gco:CharacterString>European Petroleum Survey Group (EPSG) Geodetic Parameter Registry</gco:CharacterString>
+                        </gmd:title>
+                        <gmd:date>
+                            <gmd:CI_Date>
+                                <gmd:date>
+                                    <gco:Date>2008-11-12</gco:Date>
+                                </gmd:date>
+                                <gmd:dateType>
+                                    <gmd:CI_DateTypeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue="publication">publication</gmd:CI_DateTypeCode>
+                                </gmd:dateType>
+                            </gmd:CI_Date>
+                        </gmd:date>
+                        <gmd:citedResponsibleParty>
+                            <gmd:CI_ResponsibleParty>
+                                <gmd:organisationName>
+                                    <gco:CharacterString>European Petroleum Survey Group</gco:CharacterString>
+                                </gmd:organisationName>
+                                <gmd:contactInfo>
+                                    <gmd:CI_Contact>
+                                        <gmd:onlineResource>
+                                            <gmd:CI_OnlineResource>
+                                                <gmd:linkage>
+                                                    <gmd:URL>http://www.epsg-registry.org/</gmd:URL>
+                                                </gmd:linkage>
+                                            </gmd:CI_OnlineResource>
+                                        </gmd:onlineResource>
+                                    </gmd:CI_Contact>
+                                </gmd:contactInfo>
+                                <gmd:role gco:nilReason="missing"/>
+                            </gmd:CI_ResponsibleParty>
+                        </gmd:citedResponsibleParty>                            
+                    </gmd:CI_Citation>
+                </gmd:authority>
+                <gmd:code>
+                    <gco:CharacterString>urn:ogc:def:crs:EPSG:4326</gco:CharacterString>
+                </gmd:code>
+                <gmd:version>
+                    <gco:CharacterString>6.18.3</gco:CharacterString>
+                </gmd:version>
+            </gmd:RS_Identifier>
+        </gmd:referenceSystemIdentifier>
+    </gmd:MD_ReferenceSystem>
+</gmd:referenceSystemInfo>
+*/
+//1. Coordinate Reference System
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:referenceSystemInfo/gmd:MD_ReferenceSystem/gmd:RS_Identifier/gmd:code/gco:CharacterString",
+		iso19139explode => "false" ,
+		inspire => "coordinate reference system",
+		inspiremandatory => "true",
+		iso_name => "coordinate reference system",
+		html => _mb("Coordinate reference system"),
+		value => "",
+		category => "dataspec",
+		description => _mb("Description of the coordinate reference system(s) used in the data set.")
+	),
+/*
+//2. Temporal Reference System - only mandatory if not the standard system!
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:language/gmd:LanguageCode/@codeListValue",
+		iso19139explode => "false" ,
+		inspire => "temporal reference system",
+		inspiremandatory => "true",
+		iso_name => "temporal reference system",
+		html => _mb("Temporal reference system"),
+		value => "",
+		category => "dataspec",
+		description => _mb("Description of the temporal reference system(s) used in the data set. This element is mandatory only if the spatial data set contains temporal information that does not refer to the default temporal reference system.")
+	),
+*/
+//3. Encoding
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:MD_DataIdentification/gmd:distributionInfo/gmd:MD_Distribution/gmd:distributionFormat/gmd:MD_Format/gmd:name/gco:CharacterString",
+		iso19139explode => "false" ,
+		inspire => "encoding",
+		inspiremandatory => "true",
+		iso_name => "encoding",
+		html => _mb("Encoding"),
+		value => "",
+		category => "dataspec",
+		description => _mb("Description of the computer language construct(s) specifying the representation of data objects in a record, file, message, storage device or transmission channel.")
+	),
+/*
+//4. Topological Consistency
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:language/gmd:LanguageCode/@codeListValue",
+		iso19139explode => "false" ,
+		inspire => "topological Consistency",
+		inspiremandatory => "true",
+		iso_name => "topological Consistency",
+		html => _mb("Topological Consistency"),
+		value => "",
+		category => "dataspec",
+		description => _mb("Correctness of the explicitly encoded topological characteristics of the data set as described by the scope. This element is mandatory only if the data set includes types from the Generic Network Model and does not assure centreline topology (connectivity of centrelines) for the network.")
+	),
+*/
+//5. Character Encoding
+/*<gmd:characterSet>
+  <gmd:MD_CharacterSetCode
+    codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_CharacterSetCode"
+    codeListValue="UTF8">UTF8</gmd:MD_CharacterSetCode>
+</gmd:characterSet>
+*/
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:characterSet/gmd:MD_CharacterSetCode/@codeListValue",
+		iso19139explode => "false" ,
+		inspire => "character Encoding",
+		inspiremandatory => "true",
+		iso_name => "character Encoding",
+		html => _mb("Character encoding"),
+		value => "",
+		category => "dataspec",
+		description => _mb("The character encoding used in the data set. This element is mandatory only if an encoding is used that is not based on UTF-8.")
+	),
 
 
-		array(	ibus => "t011_obj_geo.hierarchy_level",
-			iso19139 => "MD_Metadata.hierachyLevelName",
-			iso19139explode => "true" ,
-			inspire => "B 1.3 Resource Type",
-			inspiremandatory => "true",
-			iso_name => "hierachyLevelName",
-			html => "Datensatz/Datenserie",
-			gdescription => ""),
-		array(	ibus => "t012_obj_obj.object_from_id",
-			iso19139 => "MD_Metadata.parentIdentifier",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "Parent Identifier",
-			html => "Identifikator des übergeordneten Datensatzes",
-			gdescription => ""),
+//Preview (36)
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:graphicOverview/gmd:MD_BrowseGraphic/gmd:fileName/gco:CharacterString",
+		iso19139explode => "false" ,
+		inspire => "preview",
+		inspiremandatory => "false",
+		iso_name => "graphicOverview",
+		html => _mb("Preview"),
+		value => "",
+		category => "metadata",
+		description => _mb("Graphical overview of the resource.")
+	)
 
-		array(	ibus => "t02_address.city",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Stadt",
-			gdescription => ""),
-		array(	ibus => "t02_address.institution",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Organisation",
-			gdescription => ""),
-		array(	ibus => "t02_address.firstname",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Vorname",
-			gdescription => ""),
-		array(	ibus => "t02_address.lastname",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Nachname",
-			gdescription => ""),
-		array(	ibus => "t02_address.postcode",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Postleitzahl",
-			gdescription => ""),
-		array(	ibus => "t02_address.street",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Straße",
-			gdescription => ""),
+);
 
-		array(	ibus => "t021_communication.comm_value",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "B 10.1 Metadata point of contact email",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Email - Verantwortlicher für Metadaten",
-			gdescription => ""),
-array(	ibus => "t011_obj_literature.publisher",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "B 10.1 Metadata Contact Organisation",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Verantwortliche Organisation für Metadaten",
-			gdescription => ""),
-
-
-          array(	ibus => "t011_obj_literature_publishing",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "B 9.1 Responsible party organisation",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Verantwortliche Organisation",
-			gdescription => ""),
-
- 	array(	ibus => "t012_obj_adr.special_name",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "B 9.2 Responsible party role",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Rolle der verantwortlichen Organisation",
-			gdescription => ""),
-
-
-
-
-		array(	ibus => "t017_url_ref.content",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "",
-			iso_name => "",
-			html => "Art des Links",
-			gdescription => ""),
-		array(	ibus => "t017_url_ref.url_link",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Link",
-			gdescription => ""),
-		array(	ibus => "t01_object.obj_id",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Objektidentifikator",
-			gdescription => ""),
-		array(	ibus => "t01_object.obj_uuid",
-			iso19139 => "?",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Eindeutiger Objektidentifikator",
-			gdescription => ""),
-		array(	ibus => "t01_object.obj_id",
-			iso19139 => "",
-			iso19139explode => "false" ,
-			inspire => "B 1.5 Unique resource identifier",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Name des Objektes",
-			gdescription => ""),
-		array(	ibus => "t01_object.mod_time",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "B 10.2 Metadata date",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Datum des Metadatensatzes",
-			gdescription => ""),
-		array(	ibus => "t011_obj_serv_type.serv_type_key",
-			iso19139 => "MD_Metadata.identificationInfo.SV_ServiceIdentification.serviceTypeVersion",
-			iso19139explode => "" ,
-			inspire => "B 2.2 Spatial Data Service Type",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Version des Services",
-			gdescription => ""),
-
-
-
- 		array(	ibus => "t011_obj_serv_op_connpoint.connect_point",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "URL zum Online Aufruf",
-			gdescription => ""),
- 		array(	ibus => "t01_object.avail_access_note",
-			iso19139 => "identificationInfo[1]/*/resourceConstraints/*/accessConstraints",
-			iso19139explode => "" ,
-			inspire => "B 8.1 Condition applying to access and use",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Zugriffsbeschränkungen",
-			gdescription => ""),
- 		array(	ibus => "t01_object.fees",
-			iso19139 => "identificationInfo[1]/*/resourceConstraints/*/useLimitation",
-			iso19139explode => "" ,
-			inspire => "B 8.2 Limitations on public access",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Kosten/Gebühren",
-			gdescription => ""),
- 		array(	ibus => "t01_object.data_language",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "B 1.7 Resource Language",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Sprache des Datensatzes",
-			gdescription => ""),
-		
-		array(	ibus => "t011_obj_geo_topic_cat.topic_category",
-			iso19139 => "identificationInfo[1]/*/topicCategory",
-			iso19139explode => "true" ,
-			inspire => "B 2.1 Topic Category",
-			inspiremandatory => "true",
-			iso_name => "Topic Category",
-			html => "Kategorie",
-			gdescription => "ISO Kategorie")
-
-		#array(	ibus => "t011_obj_geo_topic_cat.topic.topic_category",
-			#iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.topicCategory",
-			#iso19139explode => "true" ,
-			#inspire => "",
-			#inspiremandatory => "false",
-			#iso_name => "Dataset topic category",
-			#html => "Kategorisierung",
-			#gdescription => "")
-		);
-
-if(!isset($_REQUEST["osid"]) )
-{
-	echo "no opensearch id set";
-	die();
-}
-else
-{
-	if(isset($_REQUEST["mdtype"])&($_REQUEST["mdtype"]=='debug') )
-		{	
-		echo "opensearch interface no.: ".$_REQUEST["osid"]." will be requested<br>";
-	}
-}
-
-
 #***get the information out of the mapbender-db
 #get url to search interface (opensearch):
 $sql_os = "SELECT * from gp_opensearch where os_id = $1";
@@ -528,118 +719,423 @@
 	$os_list[$cnt_os] ['url']= $row_os["os_url"];
 	$os_list[$cnt_os] ['h']= $row_os["os_h"];
 	$os_list[$cnt_os] ['standardfilter']= $row_os["os_standard_filter"];
-#os_standard_filter
+	$os_list[$cnt_os] ['version']= $row_os["os_version"];
 	$cnt_os++;
 }
 #give out count of interfaces to use
 #echo "\nCount of registrated OpenSearch Interfaces: ".count($os_list)."\n";
 #***
-
-
-	
-	
-	#define opensearch detail url
-	
-	$openSearchUrlDetail=$os_list[0] ['url']."detail?";
-	
-	#get resultlists
-	$url=$openSearchUrlDetail."plugid=".$_REQUEST['plugid']."&docid=".$_REQUEST['docid'];
-
-
-if(isset($_REQUEST["mdtype"])&($_REQUEST["mdtype"]=='debug') )
-{
-	echo "<br> REQUEST: ".$url."<br>";
+switch ($os_list[0] ['version']) {
+    	case 2:
+		#define new csw get record by id search like:
+		#http://www.portalu.de/csw202?request=GetRecordById&service=CSW&version=2.0.2&Id=81FF8BB2-2753-4A95-8C1E-F78C19035780&ElementSetName=full
+		$openSearchUrlDetail = $os_list[0] ['url'];
+		//exchange opensearch with csw202?
+		$openSearchUrlDetail = str_replace('opensearch/', 'csw202?', $openSearchUrlDetail);
+		$url = $openSearchUrlDetail."request=GetRecordById&service=CSW&version=2.0.2&Id=".$docuuid."&ElementSetName=full";
+	break;			
+	default:
+		#define opensearch detail url
+		$openSearchUrlDetail=$os_list[0] ['url']."detail?";
+		#get resultlists
+		$url=$openSearchUrlDetail."plugid=".$_REQUEST['plugid']."&docid=".$_REQUEST['docid'];
+	break;
 }
-	#create connector object
-	$openSearchObject = new connector($url);
-	#get results
-	$openSearchDetail = $openSearchObject->file;
-	
-	#save resultset in temporary folder identified by sessionid, katalog_id and page_id! Now there would be more tmp files than before! 
-	#this has to be done in order to give the information to typo3
-	#**************to be done!************************************
 
-	#parse result to simplexml 		
-	#$openSearchXml=simplexml_load_string($openSearchDetail);
+#create connector object
+$openSearchObject = new connector($url);
+#get results
+$openSearchDetail = $openSearchObject->file;
 
 
+//solve problem with xlink namespace for href attributes:
+$openSearchDetail = str_replace('xlink:href', 'xlinkhref', $openSearchDetail);
+#http://forums.devshed.com/php-development-5/simplexml-namespace-attributes-problem-452278.html
+#http://www.leftontheweb.com/message/A_small_SimpleXML_gotcha_with_namespaces
 
-		#parse result to simplexml 		
-		$openSearchDetailXML=simplexml_load_string($openSearchDetail);
-		#*****************************bbox********************************************		
-		#do things for getting the bbox of the object in crs of last defined mapbender
 
-		#read out the epsg from session
+#$openSearchDetail = str_replace('xmlns=', 'ns=', $openSearchDetail);
+$openSearchDetailXML=simplexml_load_string($openSearchDetail);
+#extract objects to iso19139 elements
+$openSearchDetailXML->registerXPathNamespace("csw", "http://www.opengis.net/cat/csw/2.0.2");
+$openSearchDetailXML->registerXPathNamespace("gml", "http://www.opengis.net/gml");
+$openSearchDetailXML->registerXPathNamespace("gco", "http://www.isotc211.org/2005/gco");
+$openSearchDetailXML->registerXPathNamespace("gmd", "http://www.isotc211.org/2005/gmd");
+$openSearchDetailXML->registerXPathNamespace("gts", "http://www.isotc211.org/2005/gts");
+$openSearchDetailXML->registerXPathNamespace("srv", "http://www.isotc211.org/2005/srv");
+$openSearchDetailXML->registerXPathNamespace("xlink", "http://www.w3.org/1999/xlink");
 
-		#read out  the bbox if exists
+//check if only iso19139 data is requested - if so - push the result automatically from the CSW getRecordById request to the user or the validator
+if ($_REQUEST['mdtype']=='iso19139' && $_REQUEST['validate'] != 'true') {
+	header("Content-type: application/xhtml+xml; charset=UTF-8");
+	//delete scw entries from response file
+	$MD_Metadata = str_replace('<csw:GetRecordByIdResponse xmlns:csw="http://www.opengis.net/cat/csw/2.0.2">', '', $openSearchDetail);
+	$MD_Metadata = str_replace('</csw:GetRecordByIdResponse>', '', $MD_Metadata);
+	echo $MD_Metadata;
+	die();
+}
+if ($_REQUEST['mdtype']=='iso19139' && $_REQUEST['validate'] == 'true') {
+	$MD_Metadata = str_replace('<csw:GetRecordByIdResponse xmlns:csw="http://www.opengis.net/cat/csw/2.0.2">', '', $openSearchDetail);
+	$MD_Metadata = str_replace('</csw:GetRecordByIdResponse>', '', $MD_Metadata);
+	validateInspireMetadataFromData($MD_Metadata);
+}
 
-		#transform bbox from wgs84 to last epsg of mapbender
-
-		#*****************************bbox********************************************
-
-		
-
-		#extract objects to iso19139 elements
-		#count unidentified elements
-		$i=0;
-
-		
-
-
-
-		#get list for ibus variables - cause php is row major
-		$ibus_names = array();
+$j=0;
+switch ($os_list[0] ['version']) {
+    	case 2:
+//register namespaces: 
+/* <gmd:MD_Metadata xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml" xmlns:gts="http://www.isotc211.org/2005/gts" xmlns:srv="http://www.isotc211.org/2005/srv" id="_ingrid-group_iplug-rp-udk-db_263">*/
 		for($a = 0; $a < count($md_ident); $a++) {
-			$ibus_names[$a] = $md_ident[$a]["ibus"];
-			if(isset($_REQUEST["mdtype"])&($_REQUEST["mdtype"]=='debug') )
-				{
-				echo "ibus_names[".$a."]=".$md_ident[$a]["ibus"]."<br>";
+			$resultOfXpath = $openSearchDetailXML->xpath('/csw:GetRecordByIdResponse'.$md_ident[$a]['iso19139']);
+			for ($i = 0; $i < count($resultOfXpath); $i++) {
+				$md_ident[$a]['value'] = $md_ident[$a]['value'].",".$resultOfXpath[$i];
 			}
-
-		} 
-
-
-
-
-
-		#define array of key-value pairs
-		$detail_array=array();
-		#read key-value pairs
-		$j=0;
-		foreach ( $openSearchDetailXML->channel->item->details->detail as $detail) { 
-		
-			$detail_key=(string)$detail->{'detail-key'};		#cast explicitly to string
-			$detail_value=(string)$detail->{'detail-value'};
-			$detail_array[$detail_key] = $detail_value;
-			$detail_keys[$j]=$detail_key;	
-	#	echo "Key: ".$detail->{'detail-key'}."<br>"; 
-	#	echo "array: ".$detail_array[$detail_key]."<br>";	#gives values
-		#check if key is in array else count failures
-			if(isset($_REQUEST["mdtype"])&($_REQUEST["mdtype"]=='debug') )
-				{
-				if (in_array($detail_key, $ibus_names)) {
-					echo "Key <b>".$detail_key."</b> exists in lookup table!<br>";
-					$i++;
-				}
+			$md_ident[$a]['value'] = ltrim($md_ident[$a]['value'],',');
+		}
+	break;
+	default:
+	foreach ( $openSearchDetailXML->channel->item->details->detail as $detail) { 
+		$detail_key=(string)$detail->{'detail-key'};		#cast explicitly to string
+		$detail_value=(string)$detail->{'detail-value'};
+		$detail_array[$detail_key] = $detail_value;
+		$detail_keys[$j]=$detail_key;	
+		if(isset($_REQUEST["mdtype"])&($_REQUEST["mdtype"]=='debug') ) {
+			if (in_array($detail_key, $ibus_names)) {
+				echo "Key <b>".$detail_key."</b> exists in lookup table!<br>";
+				$i++;
 			}
-				$j++;		
-				
-		} 
-		if(isset($_REQUEST["mdtype"])&($_REQUEST["mdtype"]=='debug') )
-			{
-			echo "<br>".$i." elements have been identified!<br>";
 		}
+		$j++;			
+	} 
+	break;
+}
 
+//generate output for different parameters mdtype
 
-#$test1=in_array('t04_search.searchterm', $ibus_names);
-#$test2=array_search('t04_search.searchterm', $ibus_names);
-#if ($test1){echo "found at position: ".$test2."<br>";}
-#else
-#{echo "not found<br>";}
-if(isset($_REQUEST["mdtype"])&($_REQUEST["mdtype"]=='debug') )
-	{
-	var_dump($detail_keys);
+switch ($_REQUEST["mdtype"]) {
+	case "html":
+		$html = '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="'.$languageCode.'">';
+		$html .= '<body>';
+		$metadataStr .= '<head>' . 
+		'<title>'._mb("Metadata").'</title>' . 
+		'<meta name="description" content="'._mb("Metadata").'" xml:lang="'.$languageCode.'" />'.
+		'<meta name="keywords" content="'._mb("Metadata").'" xml:lang="'.$languageCode.'" />'	.	
+		'<meta http-equiv="cache-control" content="no-cache">'.
+		'<meta http-equiv="pragma" content="no-cache">'.
+		'<meta http-equiv="expires" content="0">'.
+		'<meta http-equiv="content-language" content="'.$languageCode.'" />'.
+		'<meta http-equiv="content-style-type" content="text/css" />'.
+		'<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">' . 	
+		'</head>';
+		$html .= $metadataStr;
+		//define the javascripts to include
+		$html .= '<link type="text/css" href="../css/metadata.css" rel="Stylesheet" />';
+		if ($layout == 'tabs') {
+			$html .= '<link type="text/css" href="../extensions/jquery-ui-1.8.1.custom/css/custom-theme/jquery-ui-1.8.5.custom.css" rel="Stylesheet" />';	
+			$html .= '<script type="text/javascript" src="../extensions/jquery-ui-1.8.1.custom/js/jquery-1.4.2.min.js"></script>';
+			$html .= '<script type="text/javascript" src="../extensions/jquery-ui-1.8.1.custom/js/jquery-ui-1.8.1.custom.min.js"></script>';
+			//initialize tabs
+			$html .= '<script type="text/javascript">';
+			$html .= '$(function() {';
+			$html .= '	$("#tabs").tabs();';
+			$html .= '});';
+			$html .= '</script>';
+			//independently define the headers of the parts
+			$html .= '<div class="demo">';
+			$html .= '<div id="tabs">';
+			$html .= '<ul>';
+			$html .= 	'<li><a href="#tabs-1">'._mb("Overview").'</a></li>';
+			$html .= 	'<li><a href="#tabs-2">'._mb("Properties").'</a></li>';
+			$html .= 	'<li><a href="#tabs-3">'._mb("Contact").'</a></li>';
+			$html .= 	'<li><a href="#tabs-4">'._mb("Terms of use").'</a></li>';
+			$html .= 	'<li><a href="#tabs-5">'._mb("Quality").'</a></li>';
+			$html .= 	'<li><a href="#tabs-6">'._mb("Interfaces").'</a></li>';
+			$html .= '</ul>';
+		}
+		if ($layout == 'accordion') {
+			$html .= '<link type="text/css" href="../extensions/jquery-ui-1.8.1.custom/css/custom-theme/jquery-ui-1.8.4.custom.css" rel="Stylesheet" />';	
+			$html .= '<script type="text/javascript" src="../extensions/jquery-ui-1.8.1.custom/js/jquery-1.4.2.min.js"></script>';
+			$html .= '<script type="text/javascript" src="../extensions/jquery-ui-1.8.1.custom/js/jquery-ui-1.8.1.custom.min.js"></script>';
+			//define the javascript functions
+			$html .= '<script type="text/javascript">';
+			$html .= '	$(function() {';
+			$html .= '		$("#accordion").accordion();';
+			//$html .= '		$("#accordion").accordion({ autoHeight: false});';
+			//$html .= '		$("#accordion").accordion({ autoHeight: false , clearStyle: true });';
+			$html .= '	});';
+			$html .= '	</script>';
+			$html .= '<div class="demo">';
+			$html .= '<div id="accordion">';
+		}
+		if ($layout == 'plain') {
+			$html .= '<div class="demo">';
+			$html .= '<div id="plain">';
+		}
+		//some placeholders
+		$tableBegin =  "<table>\n";
+		$t_a = "\t<tr>\n\t\t<th>\n\t\t\t";
+		$t_b = "\n\t\t</th>\n\t\t<td>\n\t\t\t";
+		$t_c = "\n\t\t</td>\n\t</tr>\n";
+		$tableEnd = "</table>\n";
+		//**************************overview part begin******************************
+		//generate div tags for the content - the divs are defined in the array
+		if ($layout == 'accordion') {
+			$html .= '<h3><a href="#">'._mb("Overview").'</a></h3>';
+			$html .= '<div style="height:300px">';
+		}
+		if ($layout == 'tabs') {
+			$html .= '<div id="tabs-1">';
+		}
+		if ($layout == 'plain') {
+			$html .= '<h3>'._mb("overview").'</h3>';
+			$html .= '<div>';
+		}
+		$html .= '<p>';
+		$html .= '<fieldset><legend>'._mb("Metadata").'</legend>';
+		$html .= $tableBegin;
+		$html .= $t_a."<b>".$md_ident[0]['html']."</b>: ".$t_b.$md_ident[0]['value'].$t_c;
+		$html .= $t_a."<b>".$md_ident[31]['html']."</b>: ".$t_b.$md_ident[31]['value'].$t_c;
+		$html .= $t_a."<b>".$md_ident[32]['html']."</b>: ".$t_b.$md_ident[32]['value'].$t_c;
+		$html .= $tableEnd;
+		$html .= '</fieldset>';
+		$html .= '<fieldset><legend>'._mb("Identification").'</legend>';
+		$html .= $tableBegin;
+		$html .= $t_a."<b>".$md_ident[1]['html']."</b>: ".$t_b.$md_ident[1]['value'].$t_c;
+		$html .= $t_a."<b>".$md_ident[2]['html']."</b>: ".$t_b.$md_ident[2]['value'].$t_c;
+		$html .= $t_a."<b>".$md_ident[3]['html']."</b>: ".$t_b.$md_ident[3]['value'].$t_c;
+		if ($md_ident[36]['value'] != "") {
+			$html .= $t_a."<b>".$md_ident[36]['html']."</b>: ".$t_b."<img width=120 height=120 src = '".$md_ident[36]['value']."'>".$t_c;//preview
+		}
+		$html .= $t_a."<b>".$md_ident[5]['html']."</b>: ".$t_b.$md_ident[5]['value'].$t_c;
+		$html .= $t_a."<b>".$md_ident[6]['html']."</b>: ".$t_b.$md_ident[6]['value'].$t_c;
+		$html .= $t_a."<b>".$md_ident[26]['html']."</b>: ".$t_b.$md_ident[26]['value'].$t_c;
+		$html .= $t_a."<b>".$md_ident[27]['html']."</b>: ".$t_b.$md_ident[27]['value'].$t_c;
+		$html .= $tableEnd;
+		$html .= '</fieldset>';
+		
+		$bbox = explode(',',$md_ident[12]['value']);
 
+		if (count($bbox) == 4) {
+			$wgs84Bbox = $bbox[0].",".$bbox[2].",".$bbox[1].",".$bbox[3];
+			$getMapUrl = getExtentGraphic(explode(",", $wgs84Bbox));
+			$html .= '<fieldset><legend>'._mb("Extent").'</legend>';
+			if (defined('EXTENTSERVICEURL')) {
+				$html .= "<img src='".$getMapUrl."'>";
+			} else {
+				$html .= _mb('Graphic unavailable');
+			}
+			$html .= '</fieldset>';
+			
+		}
+		
+		$html .= '<fieldset><legend>'._mb("Contact").'</legend>';
+		$html .= $tableBegin;
+		$html .= $t_a."<b>".$md_ident[26]['html']."</b>: ".$t_b.$md_ident[26]['value'].$t_c;
+		$html .= $t_a."<b>".$md_ident[27]['html']."</b>: ".$t_b.$md_ident[27]['value'].$t_c;
+		$html .= $tableEnd;
+		$html .= '</fieldset>';
+		$html .= '</p>';
+		$html .= '</div>';//element
+		//***************************************************************************
+		//**************************properties part begin******************************
+		//generate div tags for the content - the divs are defined in the array
+		if ($layout == 'accordion') {
+			$html .= '<h3><a href="#">'._mb("Properties").'</a></h3>';
+			$html .= '<div style="height:300px">';
+		}
+		if ($layout == 'tabs') {
+			$html .= '<div id="tabs-2">';
+		}
+		if ($layout == 'plain') {
+			$html .= '<h3>'._mb("Properties").'</h3>';
+			$html .= '<div>';
+		}
+		$html .= '<p>';
+		$html .= '<fieldset><legend>'._mb("Common").'</legend>';
+		$html .= $tableBegin;
+		$html .= $t_a."<b>".$md_ident[8]['html']."</b>: ".$t_b.$md_ident[8]['value'].$t_c;
+		$html .= $t_a."<b>".$md_ident[9]['html']."</b>: ".$t_b.$md_ident[9]['value'].$t_c;
+		$html .= $t_a."<b>".$md_ident[11]['html']."</b>: ".$t_b.$md_ident[11]['value'].$t_c;
+		$html .= $tableEnd;
+		$html .= '</fieldset>';
+		$html .= '<fieldset><legend>'._mb("Geographic extent").'</legend>';
+		$html .= $tableBegin;
+		$html .= $t_a."<b>".$md_ident[33]['html']."</b>: ".$t_b.$md_ident[33]['value'].$t_c;
+		$html .= $t_a."<b>".$md_ident[12]['html']."</b>: ".$t_b.$md_ident[12]['value'].$t_c;
+		$html .= $tableEnd;
+		$html .= '</fieldset>';
+		$html .= '<fieldset><legend>'._mb("Temporal extent").'</legend>';
+		$html .= $tableBegin;
+		$html .= $t_a."<b>".$md_ident[13]['html']."</b>: ".$t_b.$md_ident[13]['value'].$t_c;
+		$html .= $t_a."<b>".$md_ident[14]['html']."</b>: ".$t_b.$md_ident[14]['value'].$t_c;
+		$html .= $t_a."<b>".$md_ident[15]['html']."</b>: ".$t_b.$md_ident[15]['value'].$t_c;
+		$html .= $t_a."<b>".$md_ident[16]['html']."</b>: ".$t_b.$md_ident[16]['value'].$t_c;
+		$html .= $tableEnd;
+		$html .= '</fieldset>';
+		$html .= '<fieldset><legend>'._mb("Format").'</legend>';
+		$html .= $tableBegin;
+		$html .= $t_a."<b>".$md_ident[34]['html']."</b>: ".$t_b.$md_ident[34]['value'].$t_c;
+		$html .= $t_a."<b>".$md_ident[35]['html']."</b>: ".$t_b.$md_ident[35]['value'].$t_c;
+		$html .= $tableEnd;
+		$html .= '</fieldset>';
+		$html .= '<fieldset><legend>'._mb("Service information").'</legend>';
+		$html .= $tableBegin;
+		$html .= $t_a."<b>".$md_ident[10]['html']."</b>: ".$t_b.$md_ident[10]['value'].$t_c;
+		$html .= $t_a."<b>".$md_ident[7]['html']."</b>: ".$t_b.$md_ident[7]['value'].$t_c;
+		$html .= $tableEnd;
+		$html .= '</fieldset>';
+		$html .= '</p>';
+		$html .= '</div>';//element
+		//***************************************************************************
+		//**************************contact part begin******************************
+		//generate div tags for the content - the divs are defined in the array
+		if ($layout == 'accordion') {
+			$html .= '<h3><a href="#">'._mb("Properties").'</a></h3>';
+			$html .= '<div style="height:300px">';
+		}
+		if ($layout == 'tabs') {
+			$html .= '<div id="tabs-3">';
+		}
+		if ($layout == 'plain') {
+			$html .= '<h3>'._mb("Properties").'</h3>';
+			$html .= '<div>';
+		}
+		$html .= '<p>';
+		$html .= '<fieldset><legend>'._mb("Data/Service provider").'</legend>';
+		$html .= $tableBegin;
+		$html .= $t_a."<b>".$md_ident[26]['html']."</b>: ".$t_b.$md_ident[26]['value'].$t_c;
+		$html .= $t_a."<b>".$md_ident[28]['html']."</b>: ".$t_b.$md_ident[28]['value'].$t_c;
+		$html .= $t_a."<b>".$md_ident[27]['html']."</b>: ".$t_b.$md_ident[27]['value'].$t_c;
+		$html .= $tableEnd;
+		$html .= '</fieldset>';
+		$html .= '<fieldset><legend>'._mb("Metadata provider").'</legend>';
+		$html .= $tableBegin;
+		$html .= $t_a."<b>".$md_ident[29]['html']."</b>: ".$t_b.$md_ident[29]['value'].$t_c;
+		$html .= $t_a."<b>".$md_ident[30]['html']."</b>: ".$t_b.$md_ident[30]['value'].$t_c;
+		$html .= $tableEnd;
+		$html .= '</fieldset>';
+		
+		$html .= '</p>';
+		$html .= '</div>';//element
+		//***************************************************************************
+		//**************************terms of use part begin******************************
+		//generate div tags for the content - the divs are defined in the array
+		if ($layout == 'accordion') {
+			$html .= '<h3><a href="#">'._mb("Terms of use").'</a></h3>';
+			$html .= '<div style="height:300px">';
+		}
+		if ($layout == 'tabs') {
+			$html .= '<div id="tabs-4">';
+		}
+		if ($layout == 'plain') {
+			$html .= '<h3>'._mb("Terms of use").'</h3>';
+			$html .= '<div>';
+		}
+		$html .= '<p>';
+		$html .= '<fieldset><legend>'._mb("Conditions").'</legend>';
+		$html .= $tableBegin;
+		$html .= $t_a."<b>".$md_ident[23]['html']."</b>: ".$t_b.$md_ident[23]['value'].$t_c;
+		$html .= $tableEnd;
+		$html .= '</fieldset>';
+		$html .= '<fieldset><legend>'._mb("Access constraints").'</legend>';
+		$html .= $tableBegin;
+		$html .= $t_a."<b>".$md_ident[24]['html']."</b>: ".$t_b.$md_ident[24]['value'].$t_c;
+		$html .= $t_a."<b>".$md_ident[25]['html']."</b>: ".$t_b.$md_ident[25]['value'].$t_c;
+		$html .= $tableEnd;
+		$html .= '</fieldset>';
+		
+		$html .= '</p>';
+		$html .= '</div>';//element
+		//***************************************************************************
+		//**************************quality part begin******************************
+		//generate div tags for the content - the divs are defined in the array
+		if ($layout == 'accordion') {
+			$html .= '<h3><a href="#">'._mb("Quality").'</a></h3>';
+			$html .= '<div style="height:300px">';
+		}
+		if ($layout == 'tabs') {
+			$html .= '<div id="tabs-5">';
+		}
+		if ($layout == 'plain') {
+			$html .= '<h3>'._mb("Quality").'</h3>';
+			$html .= '<div>';
+		}
+		$html .= '<p>';
+		$html .= '<fieldset><legend>'._mb("Lineage").'</legend>';
+		$html .= $tableBegin;
+		$html .= $t_a."<b>".$md_ident[17]['html']."</b>: ".$t_b.$md_ident[17]['value'].$t_c;
+		$html .= $tableEnd;
+		$html .= '</fieldset>';
+		$html .= '<fieldset><legend>'._mb("Resolution").'</legend>';
+		$html .= $tableBegin;
+		$html .= $t_a."<b>".$md_ident[18]['html']."</b>: ".$t_b.$md_ident[18]['value'].$t_c;
+		$html .= $t_a."<b>".$md_ident[19]['html']."</b>: ".$t_b.$md_ident[19]['value'].$t_c;
+		$html .= $tableEnd;
+		$html .= '</fieldset>';
+		$html .= '<fieldset><legend>'._mb("Validity").'</legend>';
+		$html .= $tableBegin;
+		$html .= $t_a."<b>".$md_ident[20]['html']."</b>: ".$t_b.$md_ident[20]['value'].$t_c;
+		$html .= $t_a."<b>".$md_ident[21]['html']."</b>: ".$t_b.$md_ident[21]['value'].$t_c;
+		$html .= $t_a."<b>".$md_ident[22]['html']."</b>: ".$t_b.$md_ident[22]['value'].$t_c;
+		$html .= $tableEnd;
+		$html .= '</fieldset>';
+		
+		$html .= '</p>';
+		$html .= '</div>';//element
+		//***************************************************************************
+//**************************quality part begin******************************
+		//generate div tags for the content - the divs are defined in the array
+		if ($layout == 'accordion') {
+			$html .= '<h3><a href="#">'._mb("Interfaces").'</a></h3>';
+			$html .= '<div style="height:300px">';
+		}
+		if ($layout == 'tabs') {
+			$html .= '<div id="tabs-6">';
+		}
+		if ($layout == 'plain') {
+			$html .= '<h3>'._mb("Interfaces").'</h3>';
+			$html .= '<div>';
+		}
+		$html .= '<p>';
+		$html .= '<fieldset><legend>'._mb("Metadata").'</legend>';
+		$html .= $tableBegin;
+		//exchange mdtype html with iso19139
+		$queryNew = str_replace("mdtype=html","mdtype=iso19139",$_SERVER['QUERY_STRING']);
+		$html .= $t_a."<b>"._mb("ISO19139")."</b>: <a href='".$url."' target='_blank'>"._mb("Metadata")."</a><a href='".$_SERVER['PHP_SELF']."?".$queryNew."&validate=true' target='_blank'><img style='border: none;' src = '../img/misc/icn_inspire_validate.png' title='"._mb("INSPIRE Validator")."'></a>".$t_c;
+		$html .= $tableEnd;
+		$html .= '</fieldset>';
+		
+		$html .= '</p>';
+		$html .= '</div>';//element
+		//***************************************************************************
+		$html .= '</div>'; //accordion
+		$html .= '</div>'; //demo
+		$html .= '</body>';
+		$html .= '</html>';
+		echo $html;
+		die();
+	break;
+	case "inspire":
+		echo "<a href='".$url."'>GetRecordById URL</a><br><br>";
+		for($a = 0; $a < count($md_ident); $a++) {
+			echo "<b>".$md_ident[$a]['html']."</b>: ".$md_ident[$a]['value']."<br><br>";
+		}
+		die();
+	break;
+	case "debug":
+		echo "<a href='".$url."'>GetRecordById URL</a><br><br>";
+		for($a = 0; $a < count($md_ident); $a++) {
+			echo "<b>".$md_ident[$a]['html']."</b>: ".$md_ident[$a]['value']."<br><br>";
+		}
+		die();
+	break;
+	default:
+		echo "<a href='".$url."'>GetRecordById URL</a><br><br>";
+		for($a = 0; $a < count($md_ident); $a++) {
+			echo "<b>".$md_ident[$a]['html']."</b>: ".$md_ident[$a]['value']."<br><br>";
+		}
+		die();
+	break;
 }
 
 if ($_REQUEST['mdtype']=='debug'){
@@ -649,28 +1145,21 @@
 		echo "<tr>";
 		#loop for each detail - tag - sometimes there are other tags in there - if one detail has more than one entry! - maybe this must be interpreted but later!
 		foreach ($detail_keys as $detailkey) {
-
-			#echo "<td>";
-
 			if (in_array($detailkey, $ibus_names)==false){
-
 				echo  "<td >".$detailkey."</td>";
-
 				}
 				else {
 				echo "<td bgcolor=\"green\">".$md_ident[array_search($detailkey, $ibus_names)]['html']."(".$detailkey.")</td>";
-	
-
 				}
 			#echo "</td>";
 			echo "<td>";
-
 			echo $detail_array[$detailkey];
-
 			echo "</tr>";
 		}
 		echo "</table></html>";
 }
+
+
 if ($_REQUEST['mdtype']=='html'){
 ?>
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
@@ -701,501 +1190,22 @@
 	
 	<div class="content">
 <?php
-
-
-
-		echo "<h1>Detailinformationen:</h1>";
-		#define table
-		echo "<html><table class='contenttable-0-wide'>";
-		echo "<tr>";
-		#loop for each detail - tag - sometimes there are other tags in there - if one detail has more than one entry! - maybe this must be interpreted but later!
-		foreach ($detail_keys as $detailkey) {
-			
-
-			if (in_array($detailkey, $ibus_names)==true){
-				echo "<td>".$md_ident[array_search($detailkey, $ibus_names)]['html']."</td>";
-				echo "<td>";
-				echo display_text($detail_array[$detailkey]);
-				echo "</td></tr>";
-			}
+	echo "<h1>Detailinformationen:</h1>";
+	#define table
+	echo "<html><table class='contenttable-0-wide'>";
+	echo "<tr>";
+	#loop for each detail - tag - sometimes there are other tags in there - if one detail has more than one entry! - maybe this must be interpreted but later!
+	foreach ($detail_keys as $detailkey) {	
+		if (in_array($detailkey, $ibus_names)==true){
+			echo "<td>".$md_ident[array_search($detailkey, $ibus_names)]['html']."</td>";
+			echo "<td>";
+			echo display_text($detail_array[$detailkey]);
+			echo "</td></tr>";
 		}
-		echo "</table></html>";
+	}
+	echo "</table></html>";
 }
 
-
-
-
-
-
-if ($_REQUEST['mdtype']=='iso19139') {
-//echo '<br><b>ISO19139 output comming soon!</b><br>';
-$iso19139 = new DOMDocument('1.0');
-$iso19139->encoding = 'UTF-8';
-#$iso19139->standalone = false;
-#Creating the "MD_Metadata" node
-$MD_Metadata = $iso19139->createElementNS('http://www.isotc211.org/2005/gmd', 'gmd:MD_Metadata');
-#$MD_Metadata=$iso19139->registerNamespace('srv','http://www.iso211.org/2005/srv');
-#$wmt_ms_capabilities->setAttribute("updateSequence", $wms_row["wms_timestamp"]);
-$MD_Metadata = $iso19139->appendChild($MD_Metadata);
-$MD_Metadata->setAttribute("xmlns:srv", "http://www.isotc211.org/2005/srv");
-$MD_Metadata->setAttribute("xmlns:gml", "http://www.opengis.net/gml");
-$MD_Metadata->setAttribute("xmlns:gco", "http://www.isotc211.org/2005/gco");
-$MD_Metadata->setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
-$MD_Metadata->setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
-$MD_Metadata->setAttribute("xsi:schemaLocation", "http://www.isotc211.org/2005/gmd ./xsd/gmd/gmd.xsd://www.isotc211.org/2005/srv ./xsd/srv/srv.xsd");
-#generate language part B 10.3 (if available)
-$language = $iso19139->createElement("gmd:language");
-$languagecode = $iso19139->createElement("gmd:LanguageCode");
-if (isset($detail_array['t01_object.metadata_language'])) {
-$languageText = $iso19139->createTextNode($detail_array['t01_object.metadata_language']);
-}
-else {
-$languageText = $iso19139->createTextNode("not yet defined");
-}
-$languagecode->appendChild($languageText);
-$language ->appendChild($languagecode);
-$language=$MD_Metadata->appendChild($language);
-
-#generate MD_Scope part B 1.3 (if available)
-$hierarchyLevel = $iso19139->createElement("gmd:hierarchyLevel");
-$scopecode = $iso19139->createElement("gmd:MD_ScopeCode");
-if (isset($detail_array['t011_obj_geo.hierarchy_level'])) {
-$scopeText = $iso19139->createTextNode($detail_array['t011_obj_geo.hierarchy_level']);
-}
-else {
-$scopeText = $iso19139->createTextNode("not yet defined");
-}
-$scopecode->appendChild($scopeText);
-$hierarchyLevel->appendChild($scopecode);
-$hierarchyLevel=$MD_Metadata->appendChild($hierarchyLevel);
-#Part B 10.1
-$contact=$iso19139->createElement("gmd:contact");
-$CI_ResponsibleParty=$iso19139->createElement("gmd:CI_ResponsibleParty");
-$organisationName=$iso19139->createElement("gmd:organisationName");
-$organisationName_cs=$iso19139->createElement("gco:CharacterString");
-
-if (isset($detail_array['t011_obj_literatur.publisher'])) {
-$organisationNameText=$iso19139->createTextNode($detail_array['t011_obj_literatur.publisher']);
-}
-else
-{
-$organisationNameText=$iso19139->createTextNode('not given');
-}
-$contactInfo=$iso19139->createElement("gmd:contactInfo");
-$CI_Contact=$iso19139->createElement("gmd:CI_Contact");
-$address=$iso19139->createElement("gmd:address");
-$CI_Address=$iso19139->createElement("gmd:CI_Address");
-$electronicMailAddress=$iso19139->createElement("gmd:electronicMailAddress");
-$electronicMailAddress_cs=$iso19139->createElement("gco:CharacterString");
-
-if (isset($detail_array['t021_communication.comm_value'])) {
-$electronicMailAddressText=$iso19139->createTextNode($detail_array['t021_communication.comm_value']);
-}
-else
-{
-$electronicMailAddressText=$iso19139->createTextNode('not given');
-}
-
-#create xml tree
-$organisationName_cs->appendChild($organisationNameText);
-$organisationName->appendChild($organisationName_cs);
-$CI_ResponsibleParty->appendChild($organisationName);
-
-$electronicMailAddress_cs->appendChild($electronicMailAddressText);
-$electronicMailAddress->appendChild($electronicMailAddress_cs);
-$CI_Address->appendChild($electronicMailAddress);
-$address->appendChild($CI_Address);
-$CI_Contact->appendChild($address);
-$contactInfo->appendChild($CI_Contact);
-$CI_ResponsibleParty->appendChild($contactInfo);
-
-$contact->appendChild($CI_ResponsibleParty);
-$MD_Metadata->appendChild($contact);
-
-
-#generate dateStamp part B 10.2 (if available)
-$dateStamp = $iso19139->createElement("gmd:dateStamp");
-$mddate = $iso19139->createElement("gco:Date");
-if (isset($detail_array['t01_object.mod_time'])) {
-$mddateText = $iso19139->createTextNode($detail_array['t01_object.mod_time']);
-}
-else {
-$mddateText = $iso19139->createTextNode("not yet defined");
-}
-$mddate->appendChild($mddateText);
-$dateStamp->appendChild($mddate);
-$dateStamp=$MD_Metadata->appendChild($dateStamp);
-#do the things for identification
-#create nodes
-$identificationInfo=$iso19139->createElement("gmd:identificationInfo");
-$MD_DataIdentification=$iso19139->createElement("gmd:MD_DataIdentification");
-#add attribut
-$MD_DataIdentification->setAttribute("id", "dataId");
-$citation=$iso19139->createElement("gmd:citation");
-$CI_Citation=$iso19139->createElement("gmd:CI_Citation");
-#create nodes for things which are defined - howto do the multiplicities? Ask Martin!
-#Create Resource title element B 1.1
-$title=$iso19139->createElement("gmd:title");
-$title_cs=$iso19139->createElement("gco:CharacterString");
-if (isset($detail_array['title'])) {
-$titleText = $iso19139->createTextNode($detail_array['title']);
-}
-else {
-$titleText = $iso19139->createTextNode("not yet defined");
-}
-$title_cs->appendChild($titleText);
-$title->appendChild($title_cs);
-$CI_Citation->appendChild($title);
-
-#Create date elements B5.2-5.4
-
-#Do things for B 5.2 date of publication
-if (isset($detail_array['t0113_dataset_reference.reference_date'])) {
-$date1=$iso19139->createElement("gmd:date");
-$CI_Date=$iso19139->createElement("gmd:CI_Date");
-$date2=$iso19139->createElement("gmd:date");
-$gcoDate=$iso19139->createElement("gco:Date");
-$dateType=$iso19139->createElement("gmd:dateType");
-$dateTypeCode=$iso19139->createElement("gmd:CI_DateTypeCode");
-
-
-
-
-$dateTypeCodeText=$iso19139->createTextNode('publication');
-$dateText= $iso19139->createTextNode($detail_array['t0113_dataset_reference.reference_date']);
-$dateTypeCode->appendChild($dateTypeCodeText);
-$dateType->appendChild($dateTypeCode);
-$gcoDate->appendChild($dateText);
-$date2->appendChild($gcoDate);
-$CI_Date->appendChild($date2);
-$CI_Date->appendChild($dateType);
-$date1->appendChild($CI_Date);
-$CI_Citation->appendChild($date1);
-}
-
-#Do things for B 5.3 date of revision
-if (isset($detail_array['t01_object.time_status'])) {
-$date1=$iso19139->createElement("gmd:date");
-$CI_Date=$iso19139->createElement("gmd:CI_Date");
-$date2=$iso19139->createElement("gmd:date");
-$gcoDate=$iso19139->createElement("gco:Date");
-$dateType=$iso19139->createElement("gmd:dateType");
-$dateTypeCode=$iso19139->createElement("gmd:CI_DateTypeCode");
-$dateTypeCodeText=$iso19139->createTextNode('revision');
-$dateText= $iso19139->createTextNode($detail_array['t0113_dataset_reference.reference_date']);
-$dateTypeCode->appendChild($dateTypeCodeText);
-$dateType->appendChild($dateTypeCode);
-$gcoDate->appendChild($dateText);
-$date2->appendChild($gcoDate);
-$CI_Date->appendChild($date2);
-$CI_Date->appendChild($dateType);
-$date1->appendChild($CI_Date);
-$CI_Citation->appendChild($date1);
-}
-
-#Do things for B 5.4 date of creation
-if (isset($detail_array['txx'])) {
-$date1=$iso19139->createElement("gmd:date");
-$CI_Date=$iso19139->createElement("gmd:CI_Date");
-$date2=$iso19139->createElement("gmd:date");
-$gcoDate=$iso19139->createElement("gco:Date");
-$dateType=$iso19139->createElement("gmd:dateType");
-$dateTypeCode=$iso19139->createElement("gmd:CI_DateTypeCode");
-$dateTypeCodeText=$iso19139->createTextNode('creation');
-$dateText= $iso19139->createTextNode($detail_array['t0113_dataset_reference.reference_date']);
-$dateTypeCode->appendChild($dateTypeCodeText);
-$dateType->appendChild($dateTypeCode);
-$gcoDate->appendChild($dateText);
-$date2->appendChild($gcoDate);
-$CI_Date->appendChild($date2);
-$CI_Date->appendChild($dateType);
-$date1->appendChild($CI_Date);
-$CI_Citation->appendChild($date1);
-}
-#Do things for B 1.5 Resource unique identifier
-$identifier=$iso19139->createElement("gmd:identifier");
-$rs_identifier=$iso19139->createElement("gmd:RS_Identifier");
-$code=$iso19139->createElement("gmd:code");
-$code_cs=$iso19139->createElement("gco:CharacterString");
-$codeText=$iso19139->createTextNode($detail_array['t01_object.obj_id']);
-$code_cs->appendChild($codeText);
-$code->appendChild($code_cs);
-$rs_identifier->appendChild($code);
-$identifier->appendChild($rs_identifier);
-$CI_Citation->appendChild($identifier);
-
-
-
-#create tree
-
-$citation->appendChild($CI_Citation);
-$MD_DataIdentification->appendChild($citation);
-
-#Create part for abstract B 1.2
-$abstract=$iso19139->createElement("gmd:abstract");
-$abstract_cs=$iso19139->createElement("gco:CharacterString");
-if (isset($detail_array['summary'])) {
-$abstractText = $iso19139->createTextNode($detail_array['summary']);
-}
-else {
-$abstractText = $iso19139->createTextNode("not yet defined");
-}
-$abstract_cs->appendChild($abstractText);
-$abstract->appendChild($abstract_cs);
-$MD_DataIdentification->appendChild($abstract);
-#End for abstract
-#Create part for point of contact
-#Define relevant objects
-$pointOfContact=$iso19139->createElement("gmd:pointOfContact");
-$CI_ResponsibleParty=$iso19139->createElement("gmd:CI_ResponsibleParty");
-$organisationName=$iso19139->createElement("gmd:organisationName");
-$orgaName_cs=$iso19139->createElement("gco:CharacterString");
-$contactInfo=$iso19139->createElement("gmd:contactInfo");
-$CI_Contact=$iso19139->createElement("gmd:CI_Contact");
-$address_1=$iso19139->createElement("gmd:adress");
-$CI_Address=$iso19139->createElement("gmd:CI_Address");
-$electronicMailAddress=$iso19139->createElement("gmd:electronicMailAddress");
-$email_cs=$iso19139->createElement("gco:CharacterString");
-$role=$iso19139->createElement("gmd:role");
-$CI_RoleCode=$iso19139->createElement("gmd:CI_RoleCode");
-
-
-if (isset($detail_array['t011_obj_literature_publishing'])) {
-$resOrgaText = $iso19139->createTextNode($detail_array['t011_obj_literature_publishing']);
-}
-else {
-$resOrgaText= $iso19139->createTextNode("not yet defined");
-}
-if (isset($detail_array['tmail'])) {
-$resMailText = $iso19139->createTextNode($detail_array['tmail']);
-}
-else {
-$resMailText = $iso19139->createTextNode("really wanted by INSPIRE?");
-}
-if (isset($detail_array['t012_obj_adr.special_name'])) {
-$resRoleText = $iso19139->createTextNode($detail_array['t012_obj_adr.special_name']);
-}
-else {
-$resRoleText = $iso19139->createTextNode("not yet defined");
-}
-#put them in xml
-$orgaName_cs->appendChild($resOrgaText);
-$CI_ResponsibleParty->appendChild($orgaName_cs);
-
-$email_cs->appendChild($resMailText);
-$electronicMailAddress->appendChild($email_cs);
-$CI_Address->appendChild($electronicMailAddress);
-$address_1->appendChild($CI_Address);
-$CI_Contact->appendChild($address_1);
-$contactInfo->appendChild($CI_Contact);
-$CI_ResponsibleParty->appendChild($contactInfo);
-
-$CI_RoleCode->appendChild($resRoleText);
-$role->appendChild($CI_RoleCode);
-$CI_ResponsibleParty->appendChild($role);
-
-$pointOfContact->appendChild($CI_ResponsibleParty);
-
-
-$MD_DataIdentification->appendChild($pointOfContact);
-#Part B 3 INSPIRE Category
-
-#do only if INSPIRE keyword (Annex I-III) is set
-if (isset($detail_array['t011_obj_literatur.base'])) {
-
-$descriptiveKeywords=$iso19139->createElement("gmd:descriptiveKeywords");
-$MD_Keywords=$iso19139->createElement("gmd:MD_Keywords");
-$keyword=$iso19139->createElement("gmd:keyword");
-$keyword_cs=$iso19139->createElement("gco:CharacterString");
-
-$keywordText = $iso19139->createTextNode($detail_array['t011_obj_literatur.base']);
-
-$thesaurusName=$iso19139->createElement("gmd:thesaurusName");
-$CI_Citation=$iso19139->createElement("gmd:CI_Citation");
-$title=$iso19139->createElement("gmd:title");
-$title_cs=$iso19139->createElement("gco:CharacterString");
-$titleText=$iso19139->createTextNode('GEMET Thesaurus version 1.0.0'); # to be adopted to get dynamically
-$date_1=$iso19139->createElement("gmd:date");
-
-$CI_Date=$iso19139->createElement("gmd:CI_Date");
-$date_2=$iso19139->createElement("gmd:date");
-$date_date=$iso19139->createElement("gco:Date");
-$dateText=$iso19139->createTextNode('2008-12-08');
-$dateType=$iso19139->createElement("gmd:dateType");
-$CI_DateTypeCode=$iso19139->createElement("gmd:CI_DateTypeCode");
-$CI_DateTypeCodeText=$iso19139->createTextNode('publication'); #to be adopted to get dynamically
-
-#write to xml tree
-$keyword_cs->appendChild($keywordText);
-$keyword->appendChild($keyword_cs);
-$MD_Keywords->appendChild($keyword);
-
-$title_cs->appendChild($titleText);
-$title->appendChild($title_cs);
-
-$CI_DateTypeCode->appendChild($CI_DateTypeCodeText);
-$dateType->appendChild($CI_DateTypeCode);
-
-
-$date_date->appendChild($dateText);
-$date_2->appendChild($date_date);
-
-$CI_Date->appendChild($date_2);
-$CI_Date->appendChild($dateType);
-
-$date_1->appendChild($CI_Date);
-
-$CI_Citation->appendChild($title);
-$CI_Citation->appendChild($date_1);
-
-$thesaurusName->appendChild($CI_Citation);
-$MD_Keywords->appendChild($thesaurusName);
-
-$descriptiveKeywords->appendChild($MD_Keywords);
-
-$MD_DataIdentification->appendChild($descriptiveKeywords);
-}
-#Resource Constraints B 8
-if (isset($detail_array['t01_object.avail_access_note'])){
-
-$resourceConstraints1=$iso19139->createElement("gmd:resourceConstraints");
-$MD_LegalConstraints1=$iso19139->createElement("gmd:MD_LegalConstraints");
-$accessConstraints=$iso19139->createElement("gmd:accessConstraints");
-$MD_RestrictionCode=$iso19139->createElement("gmd:MD_RestrictionCode");
-$MD_RestrictionCodeText=$iso19139->createTextNode($detail_array['t01_object.avail_access_note']);
-
-$MD_RestrictionCode->appendChild($MD_RestrictionCodeText);
-$accessConstraints->appendChild($MD_RestrictionCode);
-$MD_LegalConstraints1->appendChild($accessConstraints);
-$resourceConstraints1->appendChild($MD_LegalConstraints1);
-
-$MD_DataIdentification->appendChild($resourceConstraints1);
-}
-
-if(isset($detail_array['t01_object.fees'])){
-$resourceConstraints2=$iso19139->createElement("gmd:resourceConstraints");
-$MD_LegalConstraints2=$iso19139->createElement("gmd:MD_LegalConstraints");
-$useLimitation=$iso19139->createElement("gmd:useLimitation");
-$useLimitation_cs=$iso19139->createElement("gco:CharacterString");
-$useLimitationText=$iso19139->createTextNode($detail_array['t01_object.fees']);
-
-$useLimitation_cs->appendChild($useLimitationText);
-$useLimitation->appendChild($useLimitation_cs);
-$MD_LegalConstraints2->appendChild($useLimitation);
-$resourceConstraints2->appendChild($MD_LegalConstraints2);
-
-$MD_DataIdentification->appendChild($resourceConstraints2);
-}
-# Part B 1.7 Dataset Language
-if(isset($detail_array['t01_object.data_language'])){
-$language=$iso19139->createElement("gmd:language");
-$LanguageCode=$iso19139->createElement("gmd:LanguageCode");
-
-$LanguageCodeText=$iso19139->createTextNode($detail_array['t01_object.data_language']);
-
-
-$LanguageCode->appendChild($LanguageCodeText);
-$language->appendChild($LanguageCode);
-
-
-
-$MD_DataIdentification->appendChild($language);
-}
-
-
-
-#Topic Category B 2.1
-if(isset($detail_array['t011_obj_geo_topic_cat.topic_category'])){
-$topicCategory=$iso19139->createElement("gmd:topicCategory");
-$MD_TopicCategoryCode=$iso19139->createElement("gmd:MD_TopicCategoryCode");
-
-$MD_TopicCategoryText=$iso19139->createTextNode($detail_array['t011_obj_geo_topic_cat.topic_category']);
-
-
-$MD_TopicCategoryCode->appendChild($MD_TopicCategoryText);
-$topicCategory->appendChild($MD_TopicCategoryCode);
-
-
-
-$MD_DataIdentification->appendChild($topicCategory);
-}
-#Topic Category B 2.1
-if(isset($detail_array['x1']) and isset($detail_array['x2']) and isset($detail_array['y1']) and isset($detail_array['y2'])){
-
-$extent=$iso19139->createElement("gmd:extent");
-$EX_Extent=$iso19139->createElement("gmd:EX_Extent");
-$geographicElement=$iso19139->createElement("gmd:geographicElement");
-$EX_GeographicBoundingBox=$iso19139->createElement("gmd:EX_GeographicBoundingBox");
-
-$westBoundLongitude=$iso19139->createElement("gmd:westBoundLongitude");
-$wb_dec=$iso19139->createElement("gco:Decimal");
-$wb_text=$iso19139->createTextNode($detail_array['x1']);
-
-$eastBoundLongitude=$iso19139->createElement("gmd:eastBoundLongitude");
-$eb_dec=$iso19139->createElement("gco:Decimal");
-$eb_text=$iso19139->createTextNode($detail_array['x2']);
-
-$southBoundLatitude=$iso19139->createElement("gmd:southBoundLatitude");
-$sb_dec=$iso19139->createElement("gco:Decimal");
-$sb_text=$iso19139->createTextNode($detail_array['y1']);
-
-$northBoundLatitude=$iso19139->createElement("gmd:northBoundLatitude");
-$nb_dec=$iso19139->createElement("gco:Decimal");
-$nb_text=$iso19139->createTextNode($detail_array['y2']);
-
-
-$wb_dec->appendChild($wb_text);
-$westBoundLongitude->appendChild($wb_dec);
-$EX_GeographicBoundingBox->appendChild($westBoundLongitude);
-
-$eb_dec->appendChild($eb_text);
-$eastBoundLongitude->appendChild($eb_dec);
-$EX_GeographicBoundingBox->appendChild($eastBoundLongitude);
-
-$sb_dec->appendChild($sb_text);
-$southBoundLatitude->appendChild($sb_dec);
-$EX_GeographicBoundingBox->appendChild($southBoundLatitude);
-
-$nb_dec->appendChild($nb_text);
-$northBoundLatitude->appendChild($nb_dec);
-$EX_GeographicBoundingBox->appendChild($northBoundLatitude);
-
-$geographicElement->appendChild($EX_GeographicBoundingBox);
-$EX_Extent->appendChild($geographicElement);
-$extent->appendChild($EX_Extent);
-
-
-$MD_DataIdentification->appendChild($extent);
-}
-
-
-
-
-
-
-$identificationInfo->appendChild($MD_DataIdentification);
-$MD_Metadata->appendChild($identificationInfo);
-
-
-
-
-
-header("Content-type: application/xhtml+xml; charset=UTF-8");
-
-
-echo $iso19139->saveXml();
-
-
-
-
-
-
-
-
-
-
-
-}
 if ($_REQUEST['mdtype']=='inspire') {
 ?>
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
@@ -1215,64 +1225,30 @@
 		<link rel="stylesheet" type="text/css" href="../../../portal/fileadmin/design/css/print.css" media="print" />
 	</head>
 	<body id="top" class="popup">
-
-	
 	<div id="header_gray">
 	<a href="javascript:window.print()">Drucken <img src="../../../portal/fileadmin/design/images/icon_print.gif" width="14" height="14" alt="" /></a>
 	<a href="javascript:window.close()">Fenster schlie&szlig;en <img src="../../../portal/fileadmin/design/images/icon_close.gif" width="14" height="14" alt="" /></a>
 	</div>
 	<div id="header_redbottom"></div>
 	<div id="header_red"></div>
-	
 	<div class="content">
 <?php
-
-
-
-		echo "<img border=\"0\" src=\"img/inspire_tr_100.png\" alt=\"INSPIRE Logo\"><h1>INSPIRE Metadaten:</h1>";
-		#define table
-		echo "<html><table class='contenttable-0-wide'>";
-		echo "<tr>";
-		#loop for each detail - tag - sometimes there are other tags in there - if one detail has more than one entry! - maybe this must be interpreted but later!
-		foreach ($detail_keys as $detailkey) {
-			
-
-			if (in_array($detailkey, $ibus_names)==true){
-				if ($md_ident[array_search($detailkey, $ibus_names)]['inspiremandatory']=='true') {
-					echo "<td>".$md_ident[array_search($detailkey, $ibus_names)]['inspire']."</td>";
-					echo "<td>";
-					echo display_text($detail_array[$detailkey]);
-					echo "</td></tr>";
-				}
+	echo "<img border=\"0\" src=\"img/inspire_tr_100.png\" alt=\"INSPIRE Logo\"><h1>INSPIRE Metadaten:</h1>";
+	#define table
+	echo "<html><table class='contenttable-0-wide'>";
+	echo "<tr>";
+	#loop for each detail - tag - sometimes there are other tags in there - if one detail has more than one entry! - maybe this must be interpreted but later!
+	foreach ($detail_keys as $detailkey) {
+		if (in_array($detailkey, $ibus_names)==true){
+			if ($md_ident[array_search($detailkey, $ibus_names)]['inspiremandatory']=='true') {
+				echo "<td>".$md_ident[array_search($detailkey, $ibus_names)]['inspire']."</td>";
+				echo "<td>";
+				echo display_text($detail_array[$detailkey]);
+				echo "</td></tr>";
 			}
 		}
-		echo "</table></html>";
-
-
-
-
-
-
-
-
-echo '<br><b>INSPIRE output not completly implemented!<b><br>';
+	}
+	echo "</table></html>";
+	echo '<br><b>INSPIRE output not completly implemented!<b><br>';
 }
-
-
-
-#phpinfo();
-#$xmltest = new DOMDocument;
-#$xmltest=simplexml_load_file('/home/armin/Desktop/GDI-RP/metadaten/detail_portalu.xml');
-#$xsl = new DOMDocument;
-#var_dump($xmltest);
-//$xsl->load('simplesearch_overview.xsl');
-#$xsl=simplexml_load_file('/home/workspace/mapbender_rp/http/geoportal/opensearch2html.xsl');
-// Configure the transformer
-#var_dump($xsl);
-#$proc = new XSLTProcessor;
-#$proc->importStyleSheet($xsl); // attach the xsl rules
-#var_dump($proc);
-#$trans = $proc->transformToXML($xmltest);       
-#var_dump($trans);
-
 ?>



More information about the Mapbender_commits mailing list