specialAttribute Element

Special attributes are attributes used by the source and target plug-ins and define the processing of the component.

This page discusses:

specialAttribute Aliases

This table lists aliases (shortcuts) for the full test instruction using the specialAttribute type.

TypeFull InstructionsAlias Instructions
class Element
<test type="specialAttribute" name="class.name" 
      value="MY_CLASS" />
<class name="MY_CLASS" />
type Element
<test type="specialAttribute" name="type.name" 
      value="MY_TYPE" />
<class name="MY_TYPE" />
group Element
<test type="specialAttribute" name="group.name" 
      value="MY_GROUP" />
<class name="MY_GROUP" />

Available Special Attributes

NameDescription
class.nameContains the name of the class of the part
type.nameContains the name of the type of the part (not used currently)
group.nameContains the name of the group of the part (not used currently)
part.numberContains the part number of the part
part.deleteThis attribute marks the part to be deleted if value=”true” (only applicable to delete parts on the EDA side).

In the preferences of the Connector the user can set to used it or not. If this setting is not used local parts are updated and parts which do not exist are created. Otherwise local parts are deleted how it is configured in the mapping configuration.

specialAttribute Syntax

General syntax
<specialAttribute name="regexp" [value="regexp" regexpid="my_id" 
invert="false"] />
DescriptionTests if a special attribute exists. The optional value defined matches if the attribute has the given value. For each positive matching special attribute all child instructions of the node will be executed. This test is an alias instruction for the test Element.
AttributesNameUseAnnotation
namerequiredDefines the name of attribute. It can be either a string or any Regular Expression.
valueoptionalDefines the value of ‘name’. The value can be either a string or any Regular Expression reference. If the optional attribute value is omitted, then the test will basically just execute an existence check. If the value attribute is defined, then the test is successful if the value matches the pattern.
regexpidoptionalDefines the unique id within the namespace to reference the test using regular expressions.

Allowed character set: [p{Alnum}\_\-] = [a-z A-Z 0-9 _ -]

invertoptionalThe boolean value “true” inverts the behavior of the instruction. If the attribute is not configured the default value “false” is used and the behavior of the instruction is not inverted. If the value is set to true and the criteria do not match, the child instructions will be executed.
Examples
<!-- tests if a special attribute class.name with value AC exists. If exist execute the client 
     instructions --> 
<specialAttribute name="class.name" value="AC"> 

   ...client instructions... 
</specialAttributettribute> 

<!-- tests if a special attribute class.name exist and the value starts of the the class.name with SYM.
     If exist execute the client instructions--> 
<specialAttributettribute name="class.name" 
     value="SYM(.*)"> 
   ...client instructions... 
</specialAttributettribute> 

<!-- tests if a special attribute part.number ant with value 123 exist. If exist execute the client 
     instructions --> 
<specialAttributettribute name="part.number" value="123"> 
   ...client instructions...
</specialAttributettribute> 

<!-- tests if a special attribute part.delete with the value true exist. If exist execute the client 
     instructions --> 
<specialAttributettribute name="part.delete" value="true"> 
   ...client instructions...
</specialAttributettribute>