blob: 67fb963c099a8e29c19bc69d1c97e7e271b1d959 [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>Defining XML editor preferences</title>
</head>
<body id="txprefs"><a name="txprefs"><!-- --></a>
<h1 class="topictitle1">Defining XML editor preferences</h1>
<div><p>You can set various preferences for the Source view of the XML
editor such as the formatter indentation style, line wrapping rules, and content
assist rules. To apply the formatting styles, right-click in in the Source view
for your XML document, and click<b> Format &gt;&nbsp; Document</b>.</p><div class="skipspace">
<p>To define XML preferences,
perform the following steps:</p>
</div>
<ol><li class="skipspace"><span>Click <b> <span class="menucascade"><span class="uicontrol">Window</span> &gt; <span class="uicontrol">Preferences</span> &gt; <span class="uicontrol">Web and XML</span> &gt; <span class="uicontrol">XML Files</span> &gt; <span class="uicontrol">XML
Source</span></span></b>.</span></li>
<li class="skipspace"><span>Enter a maximum width for formatted lines in the <b> <span class="uicontrol">Line
width</span> </b>field.</span> The default value is <b>72</b>.</li>
<li class="skipspace"><span>Select <span class="uicontrol"><b>Split multiple attributes each on a new line</b></span> to
start every attribute on a new line.</span></li>
<li class="skipspace"><span>If you want blank lines to be removed when the document is formatted,
select the <b> <span class="uicontrol">Clear all blank lines</span> </b>check box. </span> By default, blank lines are preserved in a formatted document.</li>
<li class="skipspace">Select <b>Indent using tabs </b>if you want to use tab
characters (\t) as the standard formatting indentation, or, if you prefer to
use spaces, select <b>Indent using spaces.</b></li>
<li class="skipspace">You can also specify the <b>Indentation size</b> which
is the number of tabs or space characters used for formatting indentation.</li>
<li class="skipspace"><span>You can specify certain characters ('&lt;' is default) that will
cause the content assist list to pop up automatically. Ensure the<b> <span class="uicontrol">Automatically
make suggestions</span></b> check box is selected and specify the characters
in the <b> <span class="uicontrol">Prompt when these characters are inserted</span>
</b>field. </span></li>
<li class="skipspace">If you select <b>Strict</b> from the <b>Suggestion
strategy</b> list, suggestions that are grammatically valid will be shown
first (with bold icons) in the content assist list. Other suggestions that
are applicable to the element scope, but not grammatically valid, will be
shown below them with a de-emphasized icon. The default value for this field
is <b>Lax</b>.</li>
<li class="skipspace"><span>The<b> <span class="uicontrol">Use inferred grammar in absence of DTD/Schema </span>
</b>check
box is selected by default. </span> If this box is selected, when you
have an XML file that is not associated with a DTD or XML schema, you will
still be able to get content assist - the tool will infer what should come
next in your file based on the existing content.</li>
<li class="skipspace"><span>Click <b> <span class="uicontrol">Apply</span></b> and then
<b> <span class="uicontrol">OK</span></b> to
save your changes.</span></li>
</ol>
</div>
</body>
</html>