<?xml version="1.0"?>
<!DOCTYPE application SYSTEM "config_5.3.dtd">
<?dctm xml_app="Ignore"?>
<!--
     Copyright 2007 JustSystems Canada Inc.
 
     This XMetaL extension is the property of JustSystems Canada Inc.      
     and its licensors and is protected by copyright.   Modifications of   
     this extension may invalidate any support that you may be entitled to.
     Any reproduction in whole or in part is strictly prohibited.          
 
-->
<application>
    <name>DITAMap</name>
    <app_pattern>
        <element>map</element>
    </app_pattern>
    <map_rules>
        <entity_rule>
            <location>
                <path>entities</path>
                <object_type/>
            </location>
            <object_type>dm_document</object_type>
        </entity_rule>
        <xml_content_rule editable_virtual_doc="false" export="inline" make_object="true">
            <!--rule_name:Apply to map-->
            <element_selection_pattern>
                <element>map</element>
            </element_selection_pattern>
            <object_type>xm_dita_map</object_type>
            <make_entity/>
        </xml_content_rule>
        <link_rule ndata="false" peer_or_child="child">
            <!--rule_name:Apply to topic topicref-->
            <element_selection_pattern>
                <element>topicref</element>
                 <attribute_test>
                    <attr_name>format</attr_name>
                    <value>dita</value>
                </attribute_test>
                 <attribute_test>
                    <attr_name>scope</attr_name>
                    <value>local</value>
                </attribute_test>
           </element_selection_pattern>
            <link_target>
                <attr_name>href</attr_name>
            </link_target>
            <object_type>xm_dita_topic</object_type>
            <permanent_link/>
        </link_rule>
        <link_rule ndata="false" peer_or_child="child">
            <!--rule_name:Apply to file topicref-->
            <element_selection_pattern>
                <element>topicref</element>
                 <attribute_test>
                    <attr_name>scope</attr_name>
                    <value>peer</value>
                </attribute_test>
           </element_selection_pattern>
            <link_target>
                <attr_name>href</attr_name>
            </link_target>
            <permanent_link/>
        </link_rule>
        <link_rule ndata="false" peer_or_child="child">
            <!--rule_name:Apply to map topicref -->
            <element_selection_pattern>
                <element>topicref</element>
                <attribute_test>
                    <attr_name>format</attr_name>
                    <value>ditamap</value>
                </attribute_test>
                <attribute_test>
                    <attr_name>scope</attr_name>
                    <value>local</value>
                </attribute_test>
            </element_selection_pattern>
            <link_target>
                <attr_name>href</attr_name>
            </link_target>
            <object_type>xm_dita_map</object_type>
            <permanent_link/>
        </link_rule>
        <link_rule ndata="false" peer_or_child="child">
            <!--rule_name:Apply to navref-->
            <element_selection_pattern>
                <element>navref</element>
            </element_selection_pattern>
            <link_target>
                <attr_name>mapref</attr_name>
            </link_target>
            <object_type>xm_dita_map</object_type>
            <permanent_link/>
        </link_rule>
        <link_rule ndata="false" peer_or_child="peer">
            <!--rule_name:Apply to *-->
            <element_selection_pattern>
                <element>*</element>
            </element_selection_pattern>
            <link_target>
                <attr_name>conref</attr_name>
            </link_target>
            <permanent_link/>
        </link_rule>
    </map_rules>
</application>
