2.2.8 Insert Warning Action

The Warning element is the last action. This is similar to the Insert element, except it is used to generate XML nodes in the final report, which highlight patterns found in the data. Not only does the Warning element specify the edit point and the XML to insert into the final report, but it also allows the user to call out a Data or Table node in the report that the Warning will reference. The following XML snippet provides a generic example of the Warning element.

 <Warning select="XPath Expression" table="XPath Expression" tag="label">
   <Item>
     <Data name="symptom" img="warning" message="label" 
     link="label">text and/or variable</Data>
     <Data name="cause" 
     message="label">text and/or variable</Data>
     <Data name="details" 
     message="label">text and/or variable</Data>
     <Data name="resolution" 
     message="label">text and/or variable</Data>
   </Item>
 </Warning>
            

The following table describes the Warning element's attributes:

Name

Required or Optional

Description

select

Required

The XPath expression used to select the Data or Table node in the report that contains more information about the Warning.

table

Required

The XPath expression used to select the Table node where this warning message will be inserted. It is expected that this Table exists prior to executing this Action.

tag

Required

The id/label used to connect the Warning with a Data or Table node in the report.

The value of the tag attribute of the Warning element is important to call out. This value is repeated in the XML within the Warning element as the value of the link attribute of the "symptom" Data element. This creates an HTML anchor link in the final report from the text of the "symptom" Data element and the node selected by the XPath expression found in the select attribute of the Warning element. The tag attribute is also referenced by the message attribute found on all Data elements within the Warning element. This is used to create a tooltip-like message when one hovers over the element in the HTML report, which corresponds to the node selected by the XPath expression found in the select attribute of the Warning element.