Merging XML Configuration Files

(version 2.4 and higher)


Related Docs:  


    Customizable XML Configuration Files

    The following H-Sphere components are configured by means of XML files:

    Component Property
    Default Location
    Online (Context) Help HELP_CONFIG,
    E-Mail Notifications USER_EMAILS


    XML Customization Step By Step

    Instead of moving and changing a default XML file, a small custom file is created containing only the changes to be implemented, and its location is specified in in the parameter with the "CUSTOM_" prefix added to the default parameter name. For example:

    Go through the following steps to customize your XML configuration files:

  1. Login as cpanel user.
  2. Create a directory for custom XML configuration files if it does not exist, for example, ~cpanel/custom/xml.
  3. In the custom directory, create a custom XML file if it hasn't been created yet.
    <?xml version="1.0"?>
    <!DOCTYPE config [
     <!ELEMENT config (menus,interface)>
      <!ELEMENT menus (menu+)>
      <!ELEMENT menu (menuitem*,initmenu*)>
      <!ELEMENT menuitem (#PCDATA)>
      <!ELEMENT initmenu (#PCDATA)>
      <!ELEMENT interface (menudef+)>
      <!ELEMENT menudef (initmenu*,menuitem*)>
      <!ATTLIST menudef id CDATA #REQUIRED>
      <!ATTLIST menu name CDATA #REQUIRED>
      <!ATTLIST menu label CDATA #REQUIRED>
      <!ATTLIST menu platform_type CDATA "">
      <!ATTLIST menu resource CDATA "">
      <!ATTLIST menu defaultitem CDATA #REQUIRED>
      <!ATTLIST menu tip CDATA "">
      <!ATTLIST menuitem name CDATA #REQUIRED>
      <!ATTLIST menuitem label CDATA #REQUIRED>
      <!ATTLIST menuitem platform_type CDATA "">
      <!ATTLIST menuitem resource CDATA "">
      <!ATTLIST menuitem tip CDATA "">
      <!ATTLIST menuitem check_type CDATA "1">
      <!ATTLIST menuitem new_window CDATA "0">
      <!ATTLIST initmenu name CDATA #REQUIRED>
    <menu name="info" label="info.label" defaultitem="info-plans" tip="info.tip">
      <menuitem name="new_item" label="NEW PAGE" URL="/newpage.html" resource="" tip="Positive Software Corporation"/>
    In the custom XML file to be merged with the default one, you must define the same DTD structure!
  4. In ~cpanel/shiva/psoft_config/, add the location for the custom XML file, for instance:
  5. Login as root (log off from cpanel) and restart H-Sphere.

Related Docs:  

Home   Products   Services   News
© Copyright. . PSOFT. All Rights Reserved. Terms | Site Map