| <?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, 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" /> |
| <meta name="DC.rights.owner" content="(C) Copyright 2000, 2006" /> |
| <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 in the Source view for your XML document, and click Format > 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 in the Source view for your XML document, and click Format > Document." /> |
| <meta content="XML editor, setting, line wrapping rules, content assist rules, indentation style" name="DC.subject" /> |
| <meta content="XML editor, setting, line wrapping rules, content assist rules, indentation style" 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 in the Source |
| view for your XML document, and click <span class="menucascade"><span class="uicontrol">Format</span> |
| > <span class="uicontrol">Document</span></span>.</p> |
| |
| <div class="section"><p>To define XML preferences, perform the following steps:</p> |
| </div> |
| |
| <ol> |
| <li class="stepexpand"><span>Click <span class="menucascade"><span class="uicontrol">Window</span> > <span class="uicontrol">Preferences</span> |
| > <span class="uicontrol">Web and XML</span> > <span class="uicontrol">XML Files</span> > <span class="uicontrol">XML |
| Source</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>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 ('<' is default) 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> |