blob: 965774697fac56611ab70cf379025fc4f4ed989a [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>
<head>
<!-- /*******************************************************************************
* Copyright (c) 2000, 2005 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
*******************************************************************************/ -->
<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
<title>Creating XML schemas</title>
</head>
<body id="tcxmlsch"><a name="tcxmlsch"><!-- --></a>
<h1 class="topictitle1">Creating XML schemas</h1>
<div><p>You can create an XML schema and then edit it using the XML schema
editor.</p><div class="skipspace">To create an XML schema, follow these steps:</div>
<ol><li class="skipspace"><span>Create a project to contain the XML schema.</span> If you intend
to generate Java™ beans from your XML schema, we recommend that
you create a Java project to contain both the schema and the beans.
The beans must be contained in a Java project, however, the XML schema does
not have to be. Otherwise, it does not matter what kind of project you create.</li>
<li class="skipspace"><span>In the workbench, select <span class="menucascade"><span class="uicontrol">File &gt; New &gt;
Other &gt; XML &gt; XML Schema</span></span>. Click <span class="uicontrol">Next</span>.</span> If you cannot see the <span class="uicontrol">XML</span> option, select the <span class="uicontrol">Show
All Wizards</span> check box.</li>
<li class="skipspace"><span>Select the project or folder that will contain the XML schema.
In the </span> <span class="uicontrol">File name</span> field, type the name of
the XML schema, for example <kbd class="userinput">MyXMLSchema.xsd</kbd>. The name
of your XML schema must end in <tt class="sysout">.xsd</tt></li>
<li class="skipspace"><span>Click <span class="uicontrol">Finish</span>.</span></li>
</ol>
<div class="skipspace">The XML schema opens in the XML schema editor. </div>
</div>
<div>
<p><b class="relconceptshd">Related concepts</b><br />
<a href="../topics/cxmlsced.html" title="XML schemas are an XML language for describing and constraining the content of XML files. ">XML schema editor</a><br />
</p>
<p><b class="reltaskshd">Related tasks</b><br />
<a href="../topics/tedtschm.html" title="After you create an XML schema, you can edit its various properties, such as its namespace and prefix.">Editing XML schema properties</a><br />
<a href="../topics/tvdtschm.html" title="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.">Validating an XML schema</a><br />
</p>
</div>
</body>
</html>