blob: a3c3c37b3d40d0c0d0cdf5b68c3ae3b533d99885 [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>
<link rel="stylesheet" type="text/css" href="../../com.ibm.help.doc/swg_info_common.css" />
<title>Using XML content assist</title>
<script language="JavaScript">
function popup_window( url, id, width, height )
{
popup = window.open( url, id, 'toolbar=no,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=no,width=' + width + ',height=' + height + ',left=,top=' );
popup.focus();
}
</script><script language="JavaScript" src="help/liveHelp.js"></script></head>
<body id="twcdast"><a name="twcdast"><!-- --></a>
<h1 class="topictitle1">Using XML content assist</h1>
<div><p>You can use content assist to help you finish a tag or line of
code in the Source view of the XML editor. You can also use content assist
to insert macros into your XML code. The placement of the cursor in your source
file provides the context for the content assist to offer suggestions for
completion.</p><div class="skipspace"><p>You can launch content assist in any of the following ways:</p>
<ul><li>From the <span class="uicontrol">Edit</span> menu, click <span class="uicontrol">Content Assist</span>,
or</li>
<li>Press Ctrl+Space, or</li>
</ul>
<p>In addition, you can set up an option that causes content assist to
pop up automatically when certain characters are typed. To set up this option,
click <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
and 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
the <span class="uicontrol">Automatically make suggestions</span> check box, and supply
any additional characters that should trigger content assist.</p>
<p>If your
cursor is in a position where content assist is available, a pop-up list of
available choices is displayed when you launch content assist. The list is
based on the context and whether a DTD or XML schema is associated with the
XML file being edited. For example, if you have an Address element that can
contain any of the following children elements: Name, Street, City, Zip Code,
Country, and Province, if you place your cursor after any of them and launch
content assist, all of the child elements will be listed in the content assist
list.</p>
<p>The content assist list displays all valid tags for the current
cursor position, including templates. If your grammar constraints are turned
off, all available tags, not just valid ones are displayed. </p>
<p> </p>
<p>As
you type the first one or two letters of the tag that you want, the list automatically
refreshes with alphabetized choices that match your input.</p>
<p><b>Note</b>:
The list only refreshes as described if you first type <kbd class="userinput">&lt;</kbd> before
prompting for content assist.</p>
<p>Scroll down and select the tag that you
want to use by double-clicking on it. </p>
</div>
</div>
<p>
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.
</p>
</body>
</html>