modify Element

This topic describes the <modify> XML element.

General syntax
<modify target="targetname" [name="regexp"] value="regexp" />
DescriptionModifies a name or value of the given target. The target can be a special attribute value, an attribute, or an attribute value.
AttributesNameUseAnnotation
targetrequiredThe target on which the type of the operation is executed.

Valid values are:

ValueDescription
Defines an attribute type:
attribute.nameSelector representing the name of an attribute
attribute.valueSelector representing the value of an attribute
class: represents a class
class.nameSelector representing the name of a class, meaning the class itself
part.numberSelector representing the part number of the component
part.deleteSelector marking the part to be deleted. (Boolean value=”true”)
type: not used
group : not used

valuerequiredAttribute defining the new value of the target selector. The value can be either a string or any Regular Expression reference.
namerequiredAttribute defining the name of the target itself. The value can be either a string or any Regular Expression. Optional for class.
Examples
<!-- modification of an existing attribute named SYMBOL by renaming it to COMP_PROPERTY (the name of 
     the attribute is required)--> 
<modify target="attribute.name" name=" SYMBOL" value=" COMP_PROPERTY " /> 

<!-- modification of an existing attribute named SYMBOL by changing its value to COMP_PROPERTY (the 
     name attribute is here required)--> 
<modify target="attribute.value" name="SYMBOL" value=" COMP_PROPERTY " /> 

<!-- modification of the current class by renaming it to AC --> 
<modify target="class.name" value=" AC" /> 

<!-- modification of the class named RESISTOR by renaming it to AC. If no name is specified any class 
     will be renamed to AC when this instruction will be executed --> 
<modify target="class.name" name="Resistor" value=" AC" /> 

<!-- modification of the class named RESISTOR by renaming it to AC using a class test --> 
<class name=" Resistor" /> 

<!--modification of the current class by renaming it to AC ? 
    <modify target= class.name value= AC />-->
<class />

<!-- modification of special attribute part.number to the value 123--> 
<modify target="part.number" value="123" />

<!-- modification of special attribute part.delete to value true --> 
<modify target="part.delete" value="true" />