Advanced Customization > Business Logic Customization > Data Exchange using Standards in Windchill > Product Lifecycle Management Services, Version 2.0 > PLM Mapping Information > mapping.xml file
  
mapping.xml file
A mapping file (mapping.xml) that defines the elements and attribute mapping is used to convert Windchill native format (<Windchill>\loadXMLFiles\standardx20.dtd) to PLM Services format (<Windchill>\codebase\wt\ixb\schema\plm\informationalModel.xsd).
There are three types of mapping:
alias_mapping
value_reference_mapping
element_mapping
Sample Mapping Name Patterns
We have used following conventions to represent mapped element name and required attributes:
Relative path, such as Template_instance/Name/value, get/set values by it.
Absolute path for single element, such as /Digital_file, which means this element is stored in the same level as current element instead of sub element.
Alias path, such as alias_uid_for_item_version, which will be defined in alias_mapping section as following:
<alias name="alias_uid_for_item_version" path="Item_version" attribute="uid"/>
This will be same as Item_version/uid, we can use alias to reduce duplicated mapped name.
Value reference path one, such as value_reference_classification_name, which will be defined in value_reference_mapping section as following:
<value_reference name="value_reference_classification_name" mapped_name="/Specific_item_classification" path="Classification_name" ref_attribute="Associated_item"/>
This means to create a Specific_item_classification element in the same level as current element and store value to Classification_name, also Specific_item_classification will hold a reference of current element by Associated_item, we can use value reference to reduce duplicated mapped name.
Value reference path two, such as value_reference_File_format_path, which will be defined in value_reference_mapping section as following:
<value_reference name="value_reference_File_format_path" attribute_name="File_format" ref_type="/Document_format_property">
<sub_value_reference attribute_name="Data_format"/>
</value_reference>
We will create a Document_format_property element, store the value to Data_format also set the element to current element by File_format, we can use value reference to reduce duplicated mapped name.
Tips
The following variables can be used in required_attributes:
{ROOT} -- Use the root object of this element
{UUID} -- Create a random UUID
{KEY} -- Use the name of the current attribute
{VALUE} –Use the string representation of the current attribute’s value