<?xml version="1.0" encoding="UTF-8"?>
<ae:configurations xmlns:ae="http://agavi.org/agavi/config/global/envelope/1.0" xmlns="http://agavi.org/agavi/config/parts/config_handlers/1.0" parent="%core.system_config_dir%/config_handlers.xml">

    <ae:configuration>
        <handlers>

            <handler pattern="%core.config_dir%/routing.xml" class="AppKitXIncludeConfigHandler">
                <ae:parameters>
                    <!--
                        You can use __CONTEXT__ to expand the current context
                    -->
                    <ae:parameter name="query"><![CDATA[//ae:configurations/ae:configuration[@context='__CONTEXT__']/routing:routes/routing:route[@name='modules']]]></ae:parameter>
                    <ae:parameter name="pointer"><![CDATA[xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0) xmlns(r=http://icinga.org/appkit/config/parts/routing/1.0) xpointer(//ae:configurations/ae:configuration[@context='__CONTEXT__']/r:routes/node())]]></ae:parameter>
                    <ae:parameter name="includeNS">routing</ae:parameter>
                    <!--
                        Handler is needed here, because we do not use the default
                        Agavi routing handler
                    -->
                    <ae:parameter name="handler">AppKitRoutingConfigHandler</ae:parameter>
                </ae:parameters>

                <validation>%core.module_dir%/AppKit/lib/xml/xsd/routing.xsd</validation>
                <transformation>%core.module_dir%/AppKit/lib/xml/xsl/routing.xsl</transformation>
            </handler>

            <handler pattern="%core.config_dir%/databases.xml" class="AppKitXIncludeConfigHandler">
                <ae:parameters>
                    <ae:parameter name="query"><![CDATA[//ae:configurations/ae:configuration/databases:databases]]></ae:parameter>
                    <ae:parameter name="pointer"><![CDATA[xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0) xmlns(d=http://agavi.org/agavi/config/parts/databases/1.0) xpointer(//ae:configurations/ae:configuration/d:databases/d:database)]]></ae:parameter>
                    <ae:parameter name="includeNS">databases</ae:parameter>
                    <ae:parameter name="debug">true</ae:parameter>
                </ae:parameters>

                <validation>%core.agavi_dir%/config/xsd/databases.xsd</validation>
                <transformation>%core.agavi_dir%/config/xsl/databases.xsl</transformation>
            </handler>

            <handler pattern="%core.config_dir%/translation.xml" class="AppKitXIncludeConfigHandler">
                <ae:parameters>
                    <ae:parameter name="query"><![CDATA[//ae:configurations/ae:configuration/translation:translators[@default_domain='icinga.default']]]></ae:parameter>
                    <ae:parameter name="pointer"><![CDATA[xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0) xmlns(t=http://agavi.org/agavi/config/parts/translation/1.0) xpointer(//ae:configurations/ae:configuration/t:translators/t:translator)]]></ae:parameter>
                </ae:parameters>

                <validation>%core.agavi_dir%/config/xsd/translation.xsd</validation>
                <transformation>%core.agavi_dir%/config/xsl/translation.xsl</transformation>
            </handler>

            <handler pattern="%core.config_dir%/javascript.xml" class="AppKitXIncludeConfigHandler">
                <ae:parameters>
                    <ae:parameter name="query"><![CDATA[//ae:configurations/ae:configuration]]></ae:parameter>
                    <ae:parameter name="pointer">
                        <ae:parameter><![CDATA[xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0) xmlns(r=http://icinga.org/icinga/config/global/resource/1.0) xpointer(//ae:configurations/ae:configuration/r:javascript)]]></ae:parameter>
                        <ae:parameter><![CDATA[xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0) xmlns(r=http://icinga.org/icinga/config/global/resource/1.0) xpointer(//ae:configurations/ae:configuration/r:jactions)]]></ae:parameter>
                    </ae:parameter>
                    <ae:parameter name="handler">AppKitResourceConfigHandler</ae:parameter>
                </ae:parameters>

                <validation>%core.module_dir%/AppKit/lib/xml/xsd/resource.xsd</validation>
            </handler>

             <handler pattern="%core.config_dir%/css.xml" class="AppKitXIncludeConfigHandler">
                <ae:parameters>
                    <ae:parameter name="query"><![CDATA[//ae:configurations/ae:configuration]]></ae:parameter>
                    <ae:parameter name="pointer">
                        <ae:parameter><![CDATA[xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0) xmlns(r=http://icinga.org/icinga/config/global/resource/1.0) xpointer(//ae:configurations/ae:configuration/r:css_import)]]></ae:parameter>
                        <ae:parameter><![CDATA[xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0) xmlns(r=http://icinga.org/icinga/config/global/resource/1.0) xpointer(//ae:configurations/ae:configuration/r:css)]]></ae:parameter>
                    </ae:parameter>
                    <ae:parameter name="handler">AppKitResourceConfigHandler</ae:parameter>
                </ae:parameters>

                <validation>%core.module_dir%/AppKit/lib/xml/xsd/resource.xsd</validation>
            </handler>

            <handler pattern="%core.config_dir%/cronks.xml" class="AppKitXIncludeConfigHandler">
                <ae:parameter name="query"><![CDATA[//ae:configurations/ae:configuration]]></ae:parameter>
                <ae:parameter name="pointer"><![CDATA[xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0) xmlns(cronk=http://icinga.org/cronks/config/parts/cronks/1.0) xpointer(//ae:configurations/ae:configuration/node())]]></ae:parameter>
                <ae:parameter name="includeNS">cronks</ae:parameter>
                <ae:parameter name="handler">CronkModuleConfigHandler</ae:parameter>
                <validation>%core.module_dir%/Cronks/lib/xml/xsd/cronks.xsd</validation>
            </handler>

            <!-- Menu handler -->
            <handler pattern="%core.config_dir%/menu.xml" class="AppKitXIncludeConfigHandler">
                <ae:parameters>
                    <ae:parameter name="query"><![CDATA[//ae:configurations/ae:configuration]]></ae:parameter>
                    <ae:parameter name="pointer"><![CDATA[xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0) xmlns(m=http://icinga.org/icinga/config/global/menu/1.0) xpointer(//ae:configurations/ae:configuration/m:menu)]]></ae:parameter>
                </ae:parameters>

                <ae:parameter name="handler">AppKitMenuConfigHandler</ae:parameter>
                <validation>%core.module_dir%/AppKit/lib/xml/xsd/menu.xsd</validation>
            </handler>

            <handler pattern="%core.config_dir%/schedules.xml" class="AppKitXIncludeConfigHandler">

                    <ae:parameter name="query"><![CDATA[//settings:settings]]></ae:parameter>
                    <ae:parameter name="pointer"><![CDATA[xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0) xmlns(c=http://agavi.org/agavi/config/parts/settings/1.0) xpointer(//ae:configurations/ae:configuration/c:settings/node())]]></ae:parameter>



                <ae:parameter name="handler">AppKitSubSettingConfigHandler</ae:parameter>

            </handler>

        </handlers>
    </ae:configuration>
</ae:configurations>
