blob: 466eaaa4505689c07b71f503b2f933110f7d0bc8 [file] [log] [blame]
kpriceef160682006-08-29 18:08:31 +00001<?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">
2<html lang="en-us" xml:lang="en-us">
syeshinbefd53e2005-07-27 18:16:40 +00003<head>
kpriceef160682006-08-29 18:08:31 +00004<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
kpriceb59c9f62008-04-02 21:24:37 +00005<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" />
6<meta name="DC.rights.owner" content="(C) Copyright 2000, 2008" />
kpriceef160682006-08-29 18:08:31 +00007<meta content="public" name="security" />
8<meta content="index,follow" name="Robots" />
9<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))' />
10<meta content="task" name="DC.Type" />
11<meta name="DC.Title" content="Defining XML editor preferences" />
kpriceb59c9f62008-04-02 21:24:37 +000012<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." />
13<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." />
14<meta content="XML editor, preferences" name="DC.subject" />
15<meta content="XML editor, preferences" name="keywords" />
kpriceef160682006-08-29 18:08:31 +000016<meta content="XHTML" name="DC.Format" />
17<meta content="txprefs" name="DC.Identifier" />
18<meta content="en-us" name="DC.Language" />
19<link href="../../org.eclipse.wst.doc.user/common.css" type="text/css" rel="stylesheet" />
syeshinbefd53e2005-07-27 18:16:40 +000020<title>Defining XML editor preferences</title>
syeshin66078272005-09-20 16:53:38 +000021</head>
syeshinbefd53e2005-07-27 18:16:40 +000022<body id="txprefs"><a name="txprefs"><!-- --></a>
23
kpriceef160682006-08-29 18:08:31 +000024
syeshinbefd53e2005-07-27 18:16:40 +000025<h1 class="topictitle1">Defining XML editor preferences</h1>
kpriceef160682006-08-29 18:08:31 +000026
27
28
29
syeshinbefd53e2005-07-27 18:16:40 +000030<div><p>You can set various preferences for the Source view of the XML
31editor such as the formatter indentation style, line wrapping rules, and content
kpriceb59c9f62008-04-02 21:24:37 +000032assist rules. To apply the formatting styles, right-click in the Source view
33for your XML document, and click <span class="menucascade"><span class="uicontrol">Format</span>
kpriceef160682006-08-29 18:08:31 +000034 &gt; <span class="uicontrol">Document</span></span>.</p>
35
kpriceb59c9f62008-04-02 21:24:37 +000036<div class="section"><p>To define XML preferences, complete the following steps:</p>
syeshinbefd53e2005-07-27 18:16:40 +000037</div>
kpriceef160682006-08-29 18:08:31 +000038
39<ol>
40<li class="stepexpand"><span>Click <span class="menucascade"><span class="uicontrol">Window</span> &gt; <span class="uicontrol">Preferences</span>
kpriceb59c9f62008-04-02 21:24:37 +000041</span> and select <span class="menucascade"><span class="uicontrol">XML</span> &gt; <span class="uicontrol">XML
42Files</span> &gt; <span class="uicontrol">Editor</span></span>.</span></li>
kpriceef160682006-08-29 18:08:31 +000043
44<li class="stepexpand"><span>Enter a maximum width for formatted lines in the <span class="uicontrol">Line
45width</span> field</span> The default value is 72.</li>
46
47<li class="stepexpand"><span>Select <span class="uicontrol">Split multiple attributes each on a new line</span> to
syeshinbefd53e2005-07-27 18:16:40 +000048start every attribute on a new line.</span></li>
kpriceef160682006-08-29 18:08:31 +000049
kpriceb59c9f62008-04-02 21:24:37 +000050<li class="stepexpand"><span>Select <span class="uicontrol">Preserve whitespace in tags with PCDATA content</span> to
51prevent the editor from deleting whitespace in elements that contain parsed
52character data.</span></li>
53
kpriceef160682006-08-29 18:08:31 +000054<li class="stepexpand"><span>If you want blank lines to be removed when the document is formatted,
55select the <span class="uicontrol">Clear all blank lines</span> check box. </span>
56 By default, blank lines are preserved in a formatted document.
57</li>
58
59<li class="stepexpand"><span>Select <span class="uicontrol">Indent using tabs</span> if you want to
60use tab characters (\t) as the standard formatting indentation, or, if you
61prefer to use spaces, select <span class="uicontrol">Indent using spaces</span>.</span>
62</li>
63
64<li class="stepexpand"><span>You can also specify the <span class="uicontrol">Indentation size</span> which
65is the number of tabs or space characters used for formatting indentation.</span>
66</li>
67
kpriceb59c9f62008-04-02 21:24:37 +000068<li class="stepexpand"><span>You can specify certain characters (the default command
69is &lt;=) that will cause the content assist list to pop up automatically.
70Ensure the <span class="uicontrol">Automatically make suggestions</span> check box
71is selected and specify the characters in the <span class="uicontrol">Prompt when these
72characters are inserted</span> field. </span></li>
kpriceef160682006-08-29 18:08:31 +000073
74<li class="stepexpand"><span>If you select <strong>Strict</strong> from the <strong>Suggestion strategy</strong> list,
75suggestions that are grammatically valid will be shown first (with bold icons)
76in the content assist list. Other suggestions that are applicable to the element
77scope, but not grammatically valid, will be shown below them with a de-emphasized
kprice8ca223b2007-04-05 03:35:57 +000078icon. The default value for this field is <strong>Strict</strong>.</span></li>
kpriceef160682006-08-29 18:08:31 +000079
80<li class="stepexpand"><span>The <span class="uicontrol">Use inferred grammar in absence of DTD/Schema</span> check
syeshinbefd53e2005-07-27 18:16:40 +000081box is selected by default. </span> If this box is selected, when you
82have an XML file that is not associated with a DTD or XML schema, you will
83still be able to get content assist - the tool will infer what should come
84next in your file based on the existing content.</li>
kpriceef160682006-08-29 18:08:31 +000085
86<li class="stepexpand"><span>Click <span class="uicontrol">Apply</span> and then <span class="uicontrol">OK</span> to
syeshinbefd53e2005-07-27 18:16:40 +000087save your changes.</span></li>
kpriceef160682006-08-29 18:08:31 +000088
syeshinbefd53e2005-07-27 18:16:40 +000089</ol>
kpriceef160682006-08-29 18:08:31 +000090
syeshinbefd53e2005-07-27 18:16:40 +000091</div>
kpriceef160682006-08-29 18:08:31 +000092
93
syeshinbefd53e2005-07-27 18:16:40 +000094</body>
95</html>