blob: f6ef002297e2360d8ee552518d7d881ca58f4b3a [file] [log] [blame]
kprice159fa582006-05-08 21:30:45 +00001<?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">
2<html lang="en-us" xml:lang="en-us">
syeshinf3d0d4b2005-07-27 18:33:03 +00003<head>
kprice159fa582006-05-08 21:30:45 +00004<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
5<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" />
6<meta name="DC.rights.owner" content="(C) Copyright 2000, 2006" />
7<meta content="public" name="security" />
8<meta content="index,follow" name="Robots" />
9<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))' />
10<meta content="task" name="DC.Type" />
11<meta name="DC.Title" content="Validating XML schemas" />
12<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." />
13<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." />
14<meta content="XML schema files, validating" name="DC.subject" />
15<meta content="XML schema files, validating" name="keywords" />
kprice43d0c0f2006-05-18 15:56:09 +000016<meta scheme="URI" name="DC.Relation" content="../topics/tcxmlsch.html" />
kprice159fa582006-05-08 21:30:45 +000017<meta scheme="URI" name="DC.Relation" content="../../org.eclipse.jst.j2ee.doc.user/topics/tjval.html" />
18<meta scheme="URI" name="DC.Relation" content="http://www.w3.org/TR/xmlschema-1" />
19<meta scheme="URI" name="DC.Relation" content="http://www.w3.org/TR/xmlschema-2" />
20<meta content="XHTML" name="DC.Format" />
21<meta content="tvdtschm" name="DC.Identifier" />
22<meta content="en-us" name="DC.Language" />
23<link href="../../org.eclipse.wst.doc.user/common.css" type="text/css" rel="stylesheet" />
24<title>Validating XML schemas</title>
syeshin8f077832005-09-06 04:22:45 +000025</head>
syeshinf3d0d4b2005-07-27 18:33:03 +000026<body id="tvdtschm"><a name="tvdtschm"><!-- --></a>
27
kprice159fa582006-05-08 21:30:45 +000028
syeshind0bdb8e2005-10-27 17:44:14 +000029<h1 class="topictitle1">Validating XML schemas</h1>
kprice159fa582006-05-08 21:30:45 +000030
31
32
33
syeshinf3d0d4b2005-07-27 18:33:03 +000034<div><p>Validating an XML schema determines whether the current state of
35the XML schema file is semantically valid. Any errors will be displayed in
kprice159fa582006-05-08 21:30:45 +000036the Problems view.</p>
37
38<div class="section"><p>The following instructions were written for the Resource perspective,
39but they will also work in many other perspectives.</p>
40<p>To validate an XML
kprice43d0c0f2006-05-18 15:56:09 +000041schema:</p>
syeshinf3d0d4b2005-07-27 18:33:03 +000042</div>
kprice159fa582006-05-08 21:30:45 +000043
44<ol>
kprice4873f982007-04-05 03:39:40 +000045<li class="stepexpand"><span>Right-click your file in the Navigator view and click <span class="uicontrol">Validate</span>.</span>
46</li>
kprice159fa582006-05-08 21:30:45 +000047
48<li class="stepexpand"><span> If validation was not successful, you can refer to the Problems
kpriceebd54462006-05-15 22:15:20 +000049view to see what problems were logged. </span> <div class="note"><span class="notetitle">Note:</span> If you receive an
kprice159fa582006-05-08 21:30:45 +000050error message indicating that the Problems view is full, you can increase
51the number of error messages allowed by selecting <span class="menucascade"><span class="uicontrol">Properties
kprice4873f982007-04-05 03:39:40 +000052&gt; Validation</span></span> and specifying the maximum number of
53error messages allowed.</div>
syeshinf3d0d4b2005-07-27 18:33:03 +000054</li>
kprice159fa582006-05-08 21:30:45 +000055
syeshinf3d0d4b2005-07-27 18:33:03 +000056</ol>
kprice159fa582006-05-08 21:30:45 +000057
58<div class="section"><p>The XML schema support in the XML schema editor is based on the
59W3C XML Schema Recommendation Specification. The XML Schema specifications
60XML Schema Part 1: Structures and XML Schema Part 2: Datatypes from the W3C
61Web site are used for validation.</p>
62<p>Certain error messages contain a reference
63to the schema constraints listed in Appendix C of the XML Schema Part 1: Structures
64document. Each constraint has a unique name that will be referenced in the
65error message. For example, if you receive an error message with this text:
66 <tt class="sysout">ct-props-correct</tt> and you searched in the Structure
67document for the text, you would find that it is for the section "Schema Component
68Constraint: Complex Type Definition Properties Correct". </p>
69<p>You can set
70up a project's properties so that different types of project resources are
71automatically validated when you save them. From a project's pop-up menu select <span class="uicontrol">Properties</span>,
syeshinf3d0d4b2005-07-27 18:33:03 +000072then select <span class="uicontrol">Validation</span>. Any validators you can run
syeshind0bdb8e2005-10-27 17:44:14 +000073against your project will be listed in the Validation page.</p>
syeshinf3d0d4b2005-07-27 18:33:03 +000074</div>
kprice159fa582006-05-08 21:30:45 +000075
syeshinf3d0d4b2005-07-27 18:33:03 +000076</div>
77
kprice43d0c0f2006-05-18 15:56:09 +000078<div><div class="reltasks"><strong>Related tasks</strong><br />
79<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>
80</div>
81<div class="relinfo"><strong>Related information</strong><br />
lmandel79573072006-03-30 03:29:16 +000082<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>
83<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
84Schema Part 1: Structures</a></div>
85<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
86Schema Part 2: Datatypes</a></div>
87</div>
88</div>
89
syeshinf3d0d4b2005-07-27 18:33:03 +000090</body>
91</html>