root/trunk/src/xml/schema/finding-type-format-description.xsd

Revision 1498, 6.0 kB (checked in by amandel, 3 years ago)

- Get code line position information by caret as used by the java compiler.
- Support multiline messages in log files.

Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
3          xmlns:xml="http://www.w3.org/XML/1998/namespace"
4          xmlns:jcr="http://www.jcoderz.org/phoenix/report"
5          elementFormDefault="unqualified"
6          attributeFormDefault="unqualified"
7          xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
8          xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
9          jxb:extensionBindingPrefixes="xjc"
10          jxb:version="1.0">
11   <xsd:annotation>
12      <xsd:appinfo>
13         <jxb:globalBindings
14            fixedAttributeAsConstantProperty="true"
15            collectionType="java.util.ArrayList"
16            typesafeEnumBase="xsd:NCName"
17            choiceContentProperty="true"
18            typesafeEnumMemberName="generateError"
19            generateIsSetMethod="true"
20            underscoreBinding="asCharInWord">
21            <xjc:serializable uid="107"/>
22         </jxb:globalBindings>
23         <jxb:schemaBindings>
24            <jxb:package name="org.jcoderz.phoenix.report.ftf.jaxb"/>
25            <jxb:nameXmlTransform>
26               <jxb:elementName suffix="Element"/>
27            </jxb:nameXmlTransform>
28         </jxb:schemaBindings>
29      </xsd:appinfo>
30   </xsd:annotation>
31
32   <xsd:import namespace="http://www.jcoderz.org/phoenix/report"
33               schemaLocation="report-types.xsd" />
34
35    <xsd:element name="findingTypeFormatDescription"
36        type="findingTypeFormat"/>
37       
38       
39    <xsd:complexType name="findingTypeFormat">
40        <xsd:sequence>
41            <xsd:element name="staticTypeInfo" type="typeInfo"/>
42            <xsd:element name="rootType" type="findingDescription"/>
43            <xsd:element name="findingType" type="findingDescription" 
44                maxOccurs="unbounded"/>
45        </xsd:sequence>
46    </xsd:complexType>
47
48
49    <xsd:complexType name="typeInfo">
50        <xsd:sequence>
51            <xsd:element name="name" type="xsd:string"/>
52            <xsd:element name="version" type="xsd:string"/>
53            <xsd:element name="findingReportFilenamePattern" 
54                type="xsd:string"/>
55            <xsd:element name="logo" type="xsd:string"
56                minOccurs="0"/>
57            <!-- Add a base directory here? -->
58        </xsd:sequence>
59    </xsd:complexType>
60           
61    <xsd:complexType name="findingDescription">
62        <xsd:sequence>
63            <!-- Symbolic finding identifier -->
64            <xsd:element name="symbol" type="xsd:string"/>
65            <!-- Description is expected short line html
66                 If omitted the symbol is used here. -->
67            <xsd:element name="shortDescription" type="xsd:string"
68                minOccurs="0"/>
69            <!-- Description is expected to be several lines of html.
70                 If omitted the shortDescription is used here. -->
71            <xsd:element name="description" type="xsd:string" 
72                minOccurs="0"/>
73            <!-- If set, the finding is relevant independent if
74                 the source file was found in the input data. -->
75            <xsd:element name="global" type="xsd:boolean" 
76                minOccurs="0" default="false"/>
77            <!--  Regular expression to match a item. (xpath?) -->
78            <xsd:element name="pattern" type="xsd:string"/>
79            <!--  Patterns are applied according to their priority -->
80            <xsd:element name="priority" type="xsd:int" 
81                minOccurs="0" default="0"/>
82
83            <!--  Severity can be given static. -->
84            <xsd:element name="severity" type="jcr:Severity"/>
85            <!--  Severity as part of the pattern, write the number
86                of the group to be used here. -->
87            <xsd:element name="severityPos" type="xsd:string"
88                minOccurs="0"/>
89            <!--  Map text to a certain severity. -->
90            <xsd:element name="severityMap" type="severityMap"
91                minOccurs="0"/>
92            <!--  The text is passed as input to the none root
93                  finding descriptions -->
94            <xsd:element name="textPos" type="xsd:string"
95                minOccurs="0"/>
96           
97            <!--  Source file name as part of the pattern, write
98                the number of the group to be used here. -->
99            <xsd:element name="filenamePos" type="xsd:string"
100                minOccurs="0"/>
101            <xsd:element name="lineStartPos" type="xsd:string"
102                minOccurs="0"/>
103            <!--  We support one special here 'caret' which means that
104                  the source location can be determined by looking into the
105                  next 2 lines that look like this:
106                  |import org.hibernate.engine.SessionImplementor;
107                  |       ^
108                  to determine the column of the code position. -->
109            <xsd:element name="columnStartPos" type="xsd:string"
110                minOccurs="0"/>
111            <xsd:element name="lineEndPos" type="xsd:string"
112                minOccurs="0"/>
113            <xsd:element name="columnEndPos" type="xsd:string"
114                minOccurs="0"/>
115            <!-- This can be a text, that triggers the finding
116                (to be highlighted, in no exact src pos is available. -->
117            <!-- TODO: We need some way to define a fuzzyness factor! 
118                    Also it might be helpful to refer to the jedit
119                    synax highlighter class (one for the actual
120                    token to be highlighted and one for surrounding
121                    code, one for stop code.  -->
122            <xsd:element name="sourceTextPos" type="xsd:string"
123                minOccurs="0"/>
124        </xsd:sequence>
125    </xsd:complexType>
126
127    <xsd:complexType name="severityMap">
128        <xsd:sequence>
129            <xsd:element name="mapping" type="severityMapping" 
130                maxOccurs="unbounded"/>
131        </xsd:sequence>
132    </xsd:complexType>
133
134    <xsd:complexType name="severityMapping">
135        <xsd:sequence>
136            <xsd:element name="text" type="xsd:string"/> 
137            <xsd:element name="severity" type="jcr:Severity"/> 
138        </xsd:sequence>
139    </xsd:complexType>
140
141</xsd:schema>
Note: See TracBrowser for help on using the browser.