Part 2: report language

report element

A document conforming to Part 2 of the SILCN ('report language') must have a silcn root element, which has mandatory first child elements of type version. This may be followed by any well-balanced XML content, and this in turn must be followed by one or more elements named report.

report structure

A report element must have as its first child an expression-language-declaration as detailed above. This is optionally followed by one or more namespace-declaration elements, which define namespace prefixes which may be used within that report element. This is optionally followed by any well-balanced content.

The remainder of the report element contains one or more matched-set elements.

Reporting on sets of matched nodes: matched-set

Each matched-set specifies a set of nodes which conform to a single criterion specified in a document conforming to the selection language. Its child elements are:

  1. id - gives a unique identifier for the criterion on which this set has matched;

  2. node (repeatable) - gives information for each node in the set so matched.

Each node element must contain as its first child an expression element, which expresses the location of the matched node, in a language conforming to that specified by a preceding expression-language-declaration element, within the ancestor report element.

Each expression element may be followed by any well-balanced XML content.

Examples

Figure A.3. Example SILCN Part 2 ("report") instance

<?xml version='1.0'?>

<silcn:silcn xmlns:silcn='http://silcn.org/200309'>

<silcn:version>1.0</silcn:version>

<document-uri>file:///c:/test/testdoc.htm</document-uri>
<run-date>2003-09-23</run-date>
<execution-time>5087</execution-time>

<silcn:report>

<silcn:expression-language-declaration>
 <silcn:name>XPath</silcn:name>
</silcn:expression-language-declaration>

<silcn:namespace-declaration>
 <silcn:uri>http://www.w3.org/1999/xhtml</silcn:uri>
 <silcn:prefix>xh</silcn:prefix>
</silcn:namespace-declaration>

<silcn:matched-set>
 <silcn:id>40010</silcn:id>
 <silcn:node>
  <silcn:expression>//xh:html/xh:body/xh:p/xh:img[1]</silcn:expression>
  <msg>Element <eval>img</eval> should have an alt attribute.</msg>
 </silcn:node>
 <silcn:node>
  <silcn:expression>//xh:html/xh:body/xh:form/xh:input[2]</silcn:expression>
  <msg>Element <eval>input</eval> should have an alt attribute.</msg>
 </silcn:node>
</silcn:matched-set>

</silcn:report>

</silcn:silcn>