blob: 7a1db0973622a78ec3d82b262c39ee101a61adf4 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta name="copyright" content="Copyright (c) 2000, 2006 IBM Corporation and others. 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 http://www.eclipse.org/legal/epl-v10.html. Contributors: IBM Corporation - initial API and implementation" />
<meta name="DC.rights.owner" content="(C) Copyright 2000, 2006" />
<meta content="public" name="security" />
<meta content="index,follow" name="Robots" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta content="task" name="DC.Type" />
<meta name="DC.Title" content="Validating XML schemas" />
<meta name="abstract" content="Validating an XML schema determines whether the current state of the XML schema file is semantically valid. Any errors will be displayed in the Problems view." />
<meta name="description" content="Validating an XML schema determines whether the current state of the XML schema file is semantically valid. Any errors will be displayed in the Problems view." />
<meta content="XML schema files, validating" name="DC.subject" />
<meta content="XML schema files, validating" name="keywords" />
<meta scheme="URI" name="DC.Relation" content="../topics/tcxmlsch.html" />
<meta scheme="URI" name="DC.Relation" content="../../org.eclipse.jst.j2ee.doc.user/topics/tjval.html" />
<meta scheme="URI" name="DC.Relation" content="http://www.w3.org/TR/xmlschema-1" />
<meta scheme="URI" name="DC.Relation" content="http://www.w3.org/TR/xmlschema-2" />
<meta content="XHTML" name="DC.Format" />
<meta content="tvdtschm" name="DC.Identifier" />
<meta content="en-us" name="DC.Language" />
<link href="../../org.eclipse.wst.doc.user/common.css" type="text/css" rel="stylesheet" />
<title>Validating XML schemas</title>
</head>
<body id="tvdtschm"><a name="tvdtschm"><!-- --></a>
<h1 class="topictitle1">Validating XML schemas</h1>
<div><p>Validating an XML schema determines whether the current state of
the XML schema file is semantically valid. Any errors will be displayed in
the Problems view.</p>
<div class="section"><p>The following instructions were written for the Resource perspective,
but they will also work in many other perspectives.</p>
<p>To validate an XML
schema, follow these steps:</p>
</div>
<ol>
<li class="stepexpand"><span>Right-click your file in the Navigator view and click <span class="uicontrol">Run
Validation</span>.</span></li>
<li class="stepexpand"><span> If validation was not successful, you can refer to the Problems
view to see what problems were logged. </span> <div class="note"><span class="notetitle">Note: </span>If you receive an
error message indicating that the Problems view is full, you can increase
the number of error messages allowed by selecting <span class="menucascade"><span class="uicontrol">Properties
&gt; Validation</span></span> from the project's pop-up menu and
specifying the maximum number of error messages allowed.</div>
</li>
</ol>
<div class="section"><p>The XML schema support in the XML schema editor is based on the
W3C XML Schema Recommendation Specification. The XML Schema specifications
XML Schema Part 1: Structures and XML Schema Part 2: Datatypes from the W3C
Web site are used for validation.</p>
<p>Certain error messages contain a reference
to the schema constraints listed in Appendix C of the XML Schema Part 1: Structures
document. Each constraint has a unique name that will be referenced in the
error message. For example, if you receive an error message with this text:
<tt class="sysout">ct-props-correct</tt> and you searched in the Structure
document for the text, you would find that it is for the section "Schema Component
Constraint: Complex Type Definition Properties Correct". </p>
<p>You can set
up a project's properties so that different types of project resources are
automatically validated when you save them. From a project's pop-up menu select <span class="uicontrol">Properties</span>,
then select <span class="uicontrol">Validation</span>. Any validators you can run
against your project will be listed in the Validation page.</p>
</div>
</div>
<div><div class="reltasks"><strong>Related tasks</strong><br />
<div><a href="../topics/tcxmlsch.html" title="You can create an XML schema and then edit it using the XML schema editor. Using the XML schema editor, you can specify element names that indicates which elements are allowed in an XML file, and in which combinations.">Creating XML schemas</a></div>
</div>
<div class="relinfo"><strong>Related information</strong><br />
<div><a href="../../org.eclipse.jst.j2ee.doc.user/topics/tjval.html" title="General validation information">../../org.eclipse.jst.j2ee.doc.user/topics/tjval.html</a></div>
<div><a href="http://www.w3.org/TR/xmlschema-1" target="_blank" title="See the W3C Web site for more information on XML Schema specifications">XML
Schema Part 1: Structures</a></div>
<div><a href="http://www.w3.org/TR/xmlschema-2" target="_blank" title="See the W3C Web site for more information on XML Schema specifications">XML
Schema Part 2: Datatypes</a></div>
</div>
</div>
</body>
</html>