| 1 | <?xml version="1.0" ?> |
|---|
| 2 | <observationresponse xmlns="http://www.w3.org/2009/10/unicorn/observationresponse" |
|---|
| 3 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|---|
| 4 | xsi:schemaLocation="http://www.w3.org/2009/10/unicorn/observationresponse http://dev.w3.org/2006/unicorn/WebContent/WEB-INF/resources/schemas/observer-response2.xsd" |
|---|
| 5 | xml:lang="en" ref="./test/test_4.xml"> |
|---|
| 6 | |
|---|
| 7 | <group name="group1"> |
|---|
| 8 | <title>A group</title> |
|---|
| 9 | <description> |
|---|
| 10 | The group <acronym title="Extensible HyperText Markup Language">XHTML</acronym> description. |
|---|
| 11 | </description> |
|---|
| 12 | </group> |
|---|
| 13 | |
|---|
| 14 | <message type="info" group="group1"> |
|---|
| 15 | <title>This is an example observation that demonstrates the use of list and group elements</title> |
|---|
| 16 | <description>Source file for this validation is located <a href="./test/test_4.xml">here.</a> See <a href="./check?ucn_uri=localhost:8080/unicorn/test/test_3.xml&ucn_task=test">previous example</a>.</description> |
|---|
| 17 | </message> |
|---|
| 18 | |
|---|
| 19 | <message type="info" group="group1"> |
|---|
| 20 | <title>The group element</title> |
|---|
| 21 | <description> |
|---|
| 22 | You can define groups anywhere in your response. If a response contains a group, Unicorn identifies a message type (info, warning or error) by an icon next to the message title.<br /> |
|---|
| 23 | A group element contains a required <em>title</em> element and an optional <em>description</em> element.<br /> |
|---|
| 24 | It has two attributes: |
|---|
| 25 | <ul> |
|---|
| 26 | <li>a required <em>name</em> attribute which is a unique identifier of the group</li> |
|---|
| 27 | <li>an optional <em>parent</em> attribute which is used to nest a group inside another</li> |
|---|
| 28 | </ul> |
|---|
| 29 | A message is associated to a group by its <em>group</em> attribute. |
|---|
| 30 | </description> |
|---|
| 31 | </message> |
|---|
| 32 | |
|---|
| 33 | <message type="info" group="group1"> |
|---|
| 34 | <title>The list element</title> |
|---|
| 35 | <description> |
|---|
| 36 | If you have a large list of messages that share the same <em>ref</em> or <em>group</em> attribute you can nest them inside a <em>list</em> element that will define these attributes for all containing messages.<br /> |
|---|
| 37 | Nevertheless a message contained in a list can override one of both of these attributes. |
|---|
| 38 | </description> |
|---|
| 39 | </message> |
|---|
| 40 | |
|---|
| 41 | <message type="error"> |
|---|
| 42 | <title>This is an error message with no group attribute</title> |
|---|
| 43 | <description> |
|---|
| 44 | If a message does not have any <em>group</em> attribute it is associated with the first group defined in the response. |
|---|
| 45 | </description> |
|---|
| 46 | </message> |
|---|
| 47 | |
|---|
| 48 | <group name="group2"> |
|---|
| 49 | <title>Another group</title> |
|---|
| 50 | </group> |
|---|
| 51 | |
|---|
| 52 | <group name="group3" parent="group2"> |
|---|
| 53 | <title>A nested group</title> |
|---|
| 54 | <description>Description</description> |
|---|
| 55 | </group> |
|---|
| 56 | |
|---|
| 57 | <group name="group4" parent="group2"> |
|---|
| 58 | <title>Another nested group</title> |
|---|
| 59 | <description>Description</description> |
|---|
| 60 | </group> |
|---|
| 61 | |
|---|
| 62 | <list group="group3" ref="http://www.w3.org"> |
|---|
| 63 | |
|---|
| 64 | <message type="warning"> |
|---|
| 65 | <title>A warning inside a list element</title> |
|---|
| 66 | </message> |
|---|
| 67 | |
|---|
| 68 | <message type="info" ref="http://www.w3.org/standards/"> |
|---|
| 69 | <title>Information</title> |
|---|
| 70 | </message> |
|---|
| 71 | |
|---|
| 72 | <message type="error" group="group4"> |
|---|
| 73 | <title>Error</title> |
|---|
| 74 | </message> |
|---|
| 75 | |
|---|
| 76 | </list> |
|---|
| 77 | |
|---|
| 78 | </observationresponse> |
|---|