<?xml version="1.0"?>
<!DOCTYPE application SYSTEM "config_5.3.dtd">
<?dctm xml_app="Ignore"?>
<!--
     Copyright 2010 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>DITAGlossaryGroup</name>
    <app_pattern>
        <element>glossgroup</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="false">
            <!--rule_name:Don't chunk glossgroup in glossgroup -->
            <element_selection_pattern>
                <element>glossgroup</element>
                <context_rule>
                    <descendant_of>
                        <element_selection_pattern>
                            <element>glossgroup</element>
                        </element_selection_pattern>
                    </descendant_of>
                </context_rule>
            </element_selection_pattern>
            <make_entity/>
        </xml_content_rule>
        
        <xml_content_rule editable_virtual_doc="false" export="inline" make_object="true">
            <!--rule_name:Apply to glossgroup-->
            <element_selection_pattern>
                <element>glossgroup</element>
            </element_selection_pattern>
            <object_type>xm_dita_glossary</object_type>
            <make_entity/>
        </xml_content_rule>

        <link_rule ndata="false" peer_or_child="peer">
            <!--rule_name:Apply to xref with scope="local" -->
            <element_selection_pattern>
                <element>xref</element>
                <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_glossary</object_type>
            <permanent_link/>
        </link_rule>
        <link_rule ndata="false" peer_or_child="peer">
            <!--rule_name:Apply to xref with scope="peer" -->
            <element_selection_pattern>
                <element>xref</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="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>
        <link_rule ndata="false" peer_or_child="child">
            <!--rule_name:Apply to image-->
            <element_selection_pattern>
                <element>image</element>
            </element_selection_pattern>
            <link_target>
                <attr_name>href</attr_name>
            </link_target>
            <object_type>dm_document</object_type>
            <permanent_link/>
        </link_rule>
		<link_rule ndata="false" peer_or_child="child">
			<!--rule_name:Apply to object-->
			<element_selection_pattern>
				<element>object</element>
			</element_selection_pattern>
			<link_target>
				<attr_name>data</attr_name>
			</link_target>
			<object_type>dm_document</object_type>
            <permanent_link/>
		</link_rule>
        <link_rule ndata="false" peer_or_child="peer">
            <!--rule_name:Apply to link with scope="local" -->
            <element_selection_pattern>
                <element>link</element>
                <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_glossary</object_type>
            <permanent_link/>
        </link_rule>
        <link_rule ndata="false" peer_or_child="peer">
            <!--rule_name:Apply to link with scope="peer" -->
            <element_selection_pattern>
                <element>link</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>
    </map_rules>
</application>
