Touchatag.block.text resource identifier replacer

text-resource-identifier-replacer

text-resource-identifier-replacer
"urn:touchatag:block:text-resource-identifier-replacer"

Replaces all placeholders by their respective resource identifier values.

Following list of resource identifiers are supported:

  • &touchatag.tag.id; - The tag's id. This is not guaranteed to be unique.
  • &touchatag.tag.hash; - A hash made of several attributes of the tag, this value is guaranteed to be unique.
  • &touchatag.reader.id; - The reader's physical id. This is not guaranteed to be unique.
  • &touchatag.reader.hash; - A hash made of several attributes of the reader, this value is guaranteed to be unique.
  • &touchatag.client.name; - The name of the touchatag software client from which the tag event occurred. You can set the name of a touchatag client in its options menu.

Note Touchatag strongly advises developers to use hash values rather than plain id values. Differences between manufacturers of various tags and readers can result in duplicate id values. Hash values are guaranteed unique.

Example

Following specification snippet demonstrates the use of this block

 ...
 <breakdown>
      <block id="text" ref="urn:touchatag:block:text-source">
          <property name="Value">
              <text>&touchatag.client.name;</text>
          </property>
      </block>
      <block id="replacer" ref="urn:touchatag:block:text-resource-identifier-replacer"/>
 </breakdown>
 <wiring>
      <wire from="text:out" to="replacer:in"/>
 </wiring>
 ...
 

The replacer block will output a text which will look like this with following parameters:

  • client name - home
 <text>home</text>
 
<block id="text-resource-identifier-replacer" 
    ref="urn:touchatag:block:text-resource-identifier-replacer"/>