About Group Normalizer Markup

The Group Location and Group Role normalizers use a small set of XML elements to parse the role-and-location groups that are output by the Vocera Group Template.

You can think of a group that is input to the localizer as a branching tree of nodes. For example, a template such as {Room} {$Room#([100‑199],1,3)} {Bed} {$Bed#} {$Role(1,3)} allows a group name such as Room 1 0 3 Bed 2 Nurse; you can visualize this group as a branching tree with a structure similar to the following:

The structured hierarchical syntax of XML allows you to process structured input such as group names effectively. The XML <node/> elements in the Group Location and Group Role normalizers process each of the nodes in this branching tree and allow the normalizers to output normalized values for location and role.

The Group Location and Group Role normalizers use the XML syntax shown in the following table.

Table 1. Normalizer Syntax
XML Element Description

<normalizer/>

Top-level element with an optional version attribute for your own reference.

<entry/>

An element that processes a single chunk of data—either a location or a role. Both <format/> and <node/> elements are allowed within an <entry/> element.

<format/>

An immediate child of the <entry/> element, <format/> specifies either the location or role that is output by the normalizer. This output is assembled with the processing done by each of the individual nodes.

For example, a location normalizer may use a <format/> element such as the following to specify that its output is "Room" followed by a number and "Bed" followed by a number; in this example, Room 103 Bed 2 would be an allowed location:

<format>Room $room Bed $bed</format>

The <format/> element always determines the final output of the normalizer, even if $role or $location are defined in the <variables/> element.

<node/>

An immediate child of the <entry/> element or of another <node/>, each <node/> processes one or more variables in the input template. For example, the top-level node in a location normalizer may evaluate the input group, and nested nodes may evaluate room ($Room) and bed ($Bed) variables.

Each <node> element is a parent of <input>, <pattern>, and <variable/> elements.

<input/>

An immediate child of the <node/> element, <input/> specifies which variable from the template its parent <node/> is processing.

<pattern/>

An immediate child of the <node/> element, <pattern/> uses Java regular expressions to specify the pattern of data allowed into the node.

Every regular expression group in the <pattern/> element must correspond to a variable in the <variables/> element. If the <node/> specifies more <pattern/> groups than <variables/>, the normalizer produces an error.

<variables/>

An immediate child of the <node/> element, <variables/> specifies one or more variables that are refined by the parent <node/> processing. This resolved value of the <node/> element is passed to the <format/> element, which in turn uses the value as part of its output.

If the processing in any <node/> fails, the <variables/> element is not assigned a return value.