blob: a3c3c37b3d40d0c0d0cdf5b68c3ae3b533d99885 [file] [log] [blame]
syeshinbefd53e2005-07-27 18:16:40 +00001<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE html
3 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4<html>
5<head>
6<link rel="stylesheet" type="text/css" href="../../com.ibm.help.doc/swg_info_common.css" />
7<title>Using XML content assist</title>
8<script language="JavaScript">
9 function popup_window( url, id, width, height )
10 {
11 popup = window.open( url, id, 'toolbar=no,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=no,width=' + width + ',height=' + height + ',left=,top=' );
12 popup.focus();
13 }
14</script><script language="JavaScript" src="help/liveHelp.js"></script></head>
15<body id="twcdast"><a name="twcdast"><!-- --></a>
16
17<h1 class="topictitle1">Using XML content assist</h1>
18<div><p>You can use content assist to help you finish a tag or line of
19code in the Source view of the XML editor. You can also use content assist
20to insert macros into your XML code. The placement of the cursor in your source
21file provides the context for the content assist to offer suggestions for
22completion.</p><div class="skipspace"><p>You can launch content assist in any of the following ways:</p>
23<ul><li>From the <span class="uicontrol">Edit</span> menu, click <span class="uicontrol">Content Assist</span>,
24or</li>
25<li>Press Ctrl+Space, or</li>
26</ul>
27<p>In addition, you can set up an option that causes content assist to
28pop up automatically when certain characters are typed. To set up this option,
29click <span class="menucascade"><span class="uicontrol">Window</span> &gt; <span class="uicontrol"> Preferences</span></span> to open the Preferences window, then click <span class="menucascade"><span class="uicontrol">Web
30and XML</span> &gt; <span class="uicontrol">XML Files </span> &gt; <span class="uicontrol">XML Source</span></span> . In the <span class="uicontrol">Content assist</span> group box, select
31the <span class="uicontrol">Automatically make suggestions</span> check box, and supply
32any additional characters that should trigger content assist.</p>
33<p>If your
34cursor is in a position where content assist is available, a pop-up list of
35available choices is displayed when you launch content assist. The list is
36based on the context and whether a DTD or XML schema is associated with the
37XML file being edited. For example, if you have an Address element that can
38contain any of the following children elements: Name, Street, City, Zip Code,
39Country, and Province, if you place your cursor after any of them and launch
40content assist, all of the child elements will be listed in the content assist
41list.</p>
42<p>The content assist list displays all valid tags for the current
43cursor position, including templates. If your grammar constraints are turned
44off, all available tags, not just valid ones are displayed. </p>
45<p> </p>
46<p>As
47you type the first one or two letters of the tag that you want, the list automatically
48refreshes with alphabetized choices that match your input.</p>
49<p><b>Note</b>:
50The list only refreshes as described if you first type <kbd class="userinput">&lt;</kbd> before
51prompting for content assist.</p>
52<p>Scroll down and select the tag that you
53want to use by double-clicking on it. </p>
54</div>
55</div>
56<p>
57 (C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.
58</p>
59</body>
60</html>