blob: 5de5964db35646665950bbc2bea7a116d22f829b [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.</p><div class="skipspace"><p>The following instructions were written for the XML perspective,
but they will also work in many other perspectives.</p>
<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"><span>The<b> <span class="uicontrol">Indent using tabs</span>
</b>check box is selected
by default.</span> If you clear it, spaces are used instead of tab characters.</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"><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>