blob: 466eaaa4505689c07b71f503b2f933110f7d0bc8 [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, 2008 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, 2008" />
<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="Defining XML editor preferences" />
<meta name="abstract" content="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 the Source view for your XML document, and click Format &gt; Document." />
<meta name="description" content="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 the Source view for your XML document, and click Format &gt; Document." />
<meta content="XML editor, preferences" name="DC.subject" />
<meta content="XML editor, preferences" name="keywords" />
<meta content="XHTML" name="DC.Format" />
<meta content="txprefs" 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>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 the Source view
for your XML document, and click <span class="menucascade"><span class="uicontrol">Format</span>
&gt; <span class="uicontrol">Document</span></span>.</p>
<div class="section"><p>To define XML preferences, complete the following steps:</p>
</div>
<ol>
<li class="stepexpand"><span>Click <span class="menucascade"><span class="uicontrol">Window</span> &gt; <span class="uicontrol">Preferences</span>
</span> and select <span class="menucascade"><span class="uicontrol">XML</span> &gt; <span class="uicontrol">XML
Files</span> &gt; <span class="uicontrol">Editor</span></span>.</span></li>
<li class="stepexpand"><span>Enter a maximum width for formatted lines in the <span class="uicontrol">Line
width</span> field</span> The default value is 72.</li>
<li class="stepexpand"><span>Select <span class="uicontrol">Split multiple attributes each on a new line</span> to
start every attribute on a new line.</span></li>
<li class="stepexpand"><span>Select <span class="uicontrol">Preserve whitespace in tags with PCDATA content</span> to
prevent the editor from deleting whitespace in elements that contain parsed
character data.</span></li>
<li class="stepexpand"><span>If you want blank lines to be removed when the document is formatted,
select the <span class="uicontrol">Clear all blank lines</span> check box. </span>
By default, blank lines are preserved in a formatted document.
</li>
<li class="stepexpand"><span>Select <span class="uicontrol">Indent using tabs</span> if you want to
use tab characters (\t) as the standard formatting indentation, or, if you
prefer to use spaces, select <span class="uicontrol">Indent using spaces</span>.</span>
</li>
<li class="stepexpand"><span>You can also specify the <span class="uicontrol">Indentation size</span> which
is the number of tabs or space characters used for formatting indentation.</span>
</li>
<li class="stepexpand"><span>You can specify certain characters (the default command
is &lt;=) that will cause the content assist list to pop up automatically.
Ensure the <span class="uicontrol">Automatically make suggestions</span> check box
is selected and specify the characters in the <span class="uicontrol">Prompt when these
characters are inserted</span> field. </span></li>
<li class="stepexpand"><span>If you select <strong>Strict</strong> from the <strong>Suggestion strategy</strong> 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 <strong>Strict</strong>.</span></li>
<li class="stepexpand"><span>The <span class="uicontrol">Use inferred grammar in absence of DTD/Schema</span> 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="stepexpand"><span>Click <span class="uicontrol">Apply</span> and then <span class="uicontrol">OK</span> to
save your changes.</span></li>
</ol>
</div>
</body>
</html>