General syntax | <modify target="targetname" [name="regexp"] value="regexp" /> |
Description | Modifies a name or value of the given target. The target can be a special attribute value, an attribute, or an attribute value. |
Attributes | Name | Use | Annotation |
target | required | The target on which the type of the operation is executed. Valid values are: Value | Description |
---|
Defines an attribute type: | attribute.name | Selector representing the name of an attribute | attribute.value | Selector representing the value of an attribute | class: represents a class | class.name | Selector representing the name of a class, meaning the class itself | part.number | Selector representing the part number of the component | part.delete | Selector marking the part to be deleted. (Boolean value=”true”) | type: not used | group : not used | |
value | required | Attribute defining the new value of the target selector. The value can be either a string or any Regular Expression reference. |
name | required | Attribute 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" /> |