Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

 Unique Unique Approach to Defining Conditions

...

  •  (Value Path) Operation {List of match values}
  • ([controls\value]\editor\name) in {\'Rich text editor\'}

Value Path

In In order to check a condition, we have to get a value from somewhere in the content. "Value Path" serves this purpose. "Value Path" should be put in ‘(‘, ’)’ characters.
The most complex thing about the "Value Path" is how to identify which value to take, as it might be placed outside of a current content element. The good thing is that we have
already found the required element via "Value Path" and we can now begin value search starting from this element. Value path should be able to follow both
directions and each movement step should be put in '[', ']' characters. By default, navigation is "from left to right" (from parent to child, in tags tree) and it will start from a current element.

  • ']' Will tell the system to move "right to left" (from child to parent) and '[' will move "left to right" (from parent to child). 
  • You can also specify an attribute (attribute should be included in path and start with '@'), if not specified, system will take the value of a last node. 

 

Example: \value\@attribute

Operation

There are two operations we support:

  • in’ - means that a rule will be applied to a tag, if condition value matches any value from "List of match values"
  • 'not in’ - means that a rule will be applied to a tag, if condition value does not match any value from "List of match values"

List match values

List of match values should be enclosed within ‘{‘, ’}’ character. Each separate value should be enclosed within "\'" and separated by a comma.

Example:  {\'Rich text editor\', \'Image Viewer\'}

...

 

Step

Condition

Tag Tree

1: Search will start from a current root element

[controls\value]\editor\name

<controls>

<value>Translate me</value>

<editor>

  <name>Rich text editor</name>

  </editor>

</controls>

2. System will try to move "left to right", but it'll find character ‘]’,

which tells the system to move "right to left". it will navigate us to the "controls" tag

[controls\value]\editor\name

<controls>

 <value>Translate me</value>

 <editor>

  <name>Rich text editor</name>

  </editor>

</controls>

3. ‘[‘ symbol (which is to the right from the "controls" tag) tells the system to move "left to right".

[controls\value]\editor\name

<controls>

 <value>Translate me</value>

 <editor>

  <name>Rich text editor</name>

  </editor>

</controls>

4. System will continue to move to the right

[controls\value]\editor\name

<controls>

 <value>Translate me</value>

 <editor>

  <name>Rich text editor</name>

  </editor>

</controls>

 

...