blob: 7af3a740f541d09c5f5b88a1b7e3b1d2c2e80a65 [file] [log] [blame]
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="org.eclipse.wst.validation" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
<meta.schema plugin="org.eclipse.wst.validation" id="validator-v2" name="Validator V2"/>
</appinfo>
<documentation>
This is used to register a validator to the validation framework (version 2). In addition to specifying the validator to invoke, it registers a set of default filter rules, to control which resources are passsed to the validator.
</documentation>
</annotation>
<element name="extension">
<annotation>
<appinfo>
<meta.element />
</appinfo>
</annotation>
<complexType>
<sequence>
<element ref="validator"/>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
A short id that is unique within the plug-in, so that this validator can be identified.
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string" use="required">
<annotation>
<documentation>
The short user friendly name of the validator.
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="validator">
<annotation>
<documentation>
Defines a validator to the validation framework.
</documentation>
</annotation>
<complexType>
<sequence>
<element ref="include" minOccurs="0" maxOccurs="unbounded"/>
<element ref="exclude" minOccurs="0" maxOccurs="1"/>
<element ref="messageCategory" minOccurs="0" maxOccurs="unbounded"/>
<element ref="group" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="class" type="string" use="required">
<annotation>
<documentation>
The class that implements the validator.
</documentation>
<appinfo>
<meta.attribute kind="java" basedOn="org.eclipse.wst.validation.AbstractValidator"/>
</appinfo>
</annotation>
</attribute>
<attribute name="build" type="boolean">
<annotation>
<documentation>
Is this validator enabled by default for build based validations? The default is true.
</documentation>
</annotation>
</attribute>
<attribute name="manual" type="boolean">
<annotation>
<documentation>
Is this validator enabled by default for manual based validations? The default is true.
</documentation>
</annotation>
</attribute>
<attribute name="version" type="string">
<annotation>
<documentation>
The version of the definition. It is a simple integer. If not specified the version is assumed to be 1.
</documentation>
</annotation>
</attribute>
<attribute name="sourceid" type="string">
<annotation>
<documentation>
If this validator also serves as an as-you-type validator (also know as an ISourceValidator) then it&apos;s source id is specified here, so that the two validators can be associated with one another.
By source id, we mean the id that is used in the org.eclipse.wst.sse.ui.sourceValidation extension point
</documentation>
</annotation>
</attribute>
<attribute name="markerId" type="string">
<annotation>
<documentation>
If your validator wishes to use it&apos;s own marker, it can do so by supplying that marker id here.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="include">
<annotation>
<documentation>
This contains a set of inclusion rules, which are used in filtering which resources get validated. At least one of these rules must be satisfied in order for the validator to be called on the particular resource.
</documentation>
</annotation>
<complexType>
<sequence>
<element ref="rules"/>
</sequence>
</complexType>
</element>
<element name="exclude">
<annotation>
<documentation>
This contains a set of exclusion rules, used in filtering which resources get validated. If any of these rules are matched, then the validator is not called on this resource.
</documentation>
</annotation>
<complexType>
<sequence>
<element ref="rules"/>
</sequence>
</complexType>
</element>
<element name="fileext">
<annotation>
<documentation>
A file extension, for example html.
</documentation>
</annotation>
<complexType>
<attribute name="ext" type="string" use="required">
<annotation>
<documentation>
The file extension, for example html.
</documentation>
</annotation>
</attribute>
<attribute name="caseSensitive" type="boolean">
<annotation>
<documentation>
If the file extension is case sensitive, then this needs to be set to true.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="projectNature">
<annotation>
<documentation>
Used to filter on project natures.
</documentation>
</annotation>
<complexType>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
The fully qualified project nature id, for example &quot;org.eclipse.jdt.core.javanature&quot;.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="file">
<complexType>
<attribute name="name" type="string" use="required">
<annotation>
<documentation>
The file or folder name. The file name can be fully qualified, that is it starts with a leading slash (&quot;/&quot;), or it can be a relative name. Folder names are separated with the forward slash (&quot;/&quot;) character.
</documentation>
</annotation>
</attribute>
<attribute name="caseSensitive" type="boolean">
<annotation>
<documentation>
If the file name is not case senstitive, then this needs to be set to false.
</documentation>
</annotation>
</attribute>
<attribute name="type" use="required">
<annotation>
<documentation>
Type of name, there are three choices. &lt;ul&gt;&lt;li&gt;folder - specifies a project relative folder name.&lt;/li&gt;&lt;li&gt;file - a simple file name (i.e. no path information).&lt;/li&gt;&lt;li&gt;full - a fully qualified (project relative) file name.&lt;/li&gt;&lt;/ul&gt;
</documentation>
</annotation>
<simpleType>
<restriction base="string">
<enumeration value="folder">
</enumeration>
<enumeration value="file">
</enumeration>
<enumeration value="full">
</enumeration>
</restriction>
</simpleType>
</attribute>
</complexType>
</element>
<element name="rules">
<annotation>
<documentation>
A set of rules for determining if a resource is passed to this validator or not. The rules are OR&apos;ed together.
</documentation>
</annotation>
<complexType>
<sequence>
<element ref="fileext" minOccurs="0" maxOccurs="unbounded"/>
<element ref="file" minOccurs="0" maxOccurs="unbounded"/>
<element ref="projectNature" minOccurs="0" maxOccurs="unbounded"/>
<element ref="facet" minOccurs="0" maxOccurs="unbounded"/>
<element ref="contentType" minOccurs="0" maxOccurs="unbounded"/>
<element ref="pattern" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
<element name="facet">
<complexType>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
The facet id.
</documentation>
</annotation>
</attribute>
<attribute name="version" type="string">
<annotation>
<documentation>
A version expression that can be used to futher qualify the match. If not specifed, then versions are not used as a criteria for selecting the facet. The syntax of this expression, is the same syntax that is used by the facet framework.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="group">
<annotation>
<documentation>
Declares that this validator belongs to this validation group.
</documentation>
</annotation>
<complexType>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
The fully qualified ID of the validation group to which this validator belongs.
</documentation>
<appinfo>
<meta.attribute kind="identifier"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="contentType">
<annotation>
<documentation>
Used to filter based on content types.
</documentation>
</annotation>
<complexType>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
The content type id.
</documentation>
</annotation>
</attribute>
<attribute name="exactMatch" type="boolean">
<annotation>
<documentation>
Set to true if the content type needs to match exactly. Set to false if sub types are considered matches as well.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<element name="messageCategory">
<annotation>
<documentation>
Used to group together a set of messages, where the user can change the message severity of all the messages in the group. This is similar to the support in the JDT, where for example a user can specify whether used methods should be errors, warnings or ignored.
</documentation>
</annotation>
<complexType>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
A simple id that is unique within the scope of this validator.
</documentation>
</annotation>
</attribute>
<attribute name="label" type="string" use="required">
<annotation>
<documentation>
A short, one line label that is displayed to the end user, that describes the message category.
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
<attribute name="severity">
<annotation>
<documentation>
The default severity for this category.
</documentation>
</annotation>
<simpleType>
<restriction base="string">
<enumeration value="error">
</enumeration>
<enumeration value="warning">
</enumeration>
<enumeration value="ignore">
</enumeration>
</restriction>
</simpleType>
</attribute>
</complexType>
</element>
<element name="pattern">
<annotation>
<documentation>
Holds a regualr expression, that matches the resource&apos;s project relative name.
</documentation>
</annotation>
<complexType>
<attribute name="regex" type="string" use="required">
<annotation>
<documentation>
Holds a Java regular expression. See the class java.util.regex.Pattern for more details. This regular expression is matched against a resource&apos;s project relative path, after that path has been converted into a portable path.
&lt;p&gt;The path will always start with a forward slash (/) so that folder names can be more easily matched.
</documentation>
</annotation>
</attribute>
<attribute name="caseSensitive" type="boolean">
<annotation>
<documentation>
If the file name is not case senstitive, then this needs to be set to false.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<annotation>
<appinfo>
<meta.section type="since"/>
</appinfo>
<documentation>
WebTools 3.0.
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="examples"/>
</appinfo>
<documentation>
An example of a validator that will be called on resources that have html or htm file extensions.
&lt;pre&gt;
&lt;extension
point=&quot;org.eclipse.wst.validation.validator&quot;
id=&quot;Test&quot; name=&quot;%Validator.Name&quot;&gt;
&lt;validator class=&quot;org.eclipse.wst.validation.test.TestValidator&quot;&gt;
&lt;include&gt;
&lt;rules&gt;
&lt;fileext ext=&quot;html&quot;/&gt;
&lt;fileext ext=&quot;htm&quot;/&gt;
&lt;/rules&gt;
&lt;/include&gt;
&lt;/validator&gt;
&lt;/extension&gt;
&lt;/pre&gt;
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="copyright"/>
</appinfo>
<documentation>
Copyright (c) 2007,2008 IBM Corporation and others.&lt;br&gt;
All rights reserved. This program and the accompanying materials are made
available under the terms of the Eclipse Public License v1.0 which accompanies
this distribution, and is available at &lt;a
href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="apiInfo"/>
</appinfo>
<documentation>
Provisional API.
</documentation>
</annotation>
</schema>