blob: b9d9ffd28a26184f7a831bd5e50833f45c5f3ec5 [file] [log] [blame]
kpriceef160682006-08-29 18:08:31 +00001<?xml version="1.0" encoding="utf-8"?>
kpriceb59c9f62008-04-02 21:24:37 +00002<!--Arbortext, Inc., 1988-2006, v.4002-->
kpriceb80ff2a2006-09-18 19:22:32 +00003<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN"
4 "task.dtd">
kpriceef160682006-08-29 18:08:31 +00005<task id="txprefs" xml:lang="en-us">
6<title>Defining XML editor preferences</title>
8<searchtitle>Defining XML editor preferences</searchtitle>
10<shortdesc>You can set various preferences for the Source view of the XML
11editor such as the formatter indentation style, line wrapping rules, and content
kpriceb59c9f62008-04-02 21:24:37 +000012assist rules. To apply the formatting styles, right-click in the Source view
13for your XML document, and click <menucascade><uicontrol>Format</uicontrol>
kpriceef160682006-08-29 18:08:31 +000014<uicontrol>Document</uicontrol></menucascade>.</shortdesc>
kprice9623e9d2007-05-03 03:43:05 +000016<keywords><indexterm>XML editor<indexterm>preferences</indexterm></indexterm>
kpriceb59c9f62008-04-02 21:24:37 +000017<indexterm>preferences<indexterm>XML editor</indexterm></indexterm></keywords>
kpriceef160682006-08-29 18:08:31 +000018</metadata></prolog>
kpriceb59c9f62008-04-02 21:24:37 +000020<context><p>To define XML preferences, complete the following steps:</p></context>
kpriceef160682006-08-29 18:08:31 +000021<steps>
22<step><cmd>Click <menucascade><uicontrol>Window</uicontrol><uicontrol>Preferences</uicontrol>
kpriceb59c9f62008-04-02 21:24:37 +000023</menucascade> and select <menucascade><uicontrol>XML</uicontrol><uicontrol>XML
kpriceef160682006-08-29 18:08:31 +000025<step><cmd>Enter a maximum width for formatted lines in the <uicontrol>Line
26width</uicontrol> field</cmd><info>The default value is 72.</info></step>
27<step><cmd>Select <uicontrol>Split multiple attributes each on a new line</uicontrol> to
28start every attribute on a new line.</cmd></step>
kpriceb59c9f62008-04-02 21:24:37 +000029<step><cmd>Select <uicontrol>Preserve whitespace in tags with PCDATA content</uicontrol> to
30prevent the editor from deleting whitespace in elements that contain parsed
31character data.</cmd></step>
kpriceef160682006-08-29 18:08:31 +000032<step><cmd>If you want blank lines to be removed when the document is formatted,
33select the <uicontrol>Clear all blank lines</uicontrol> check box. </cmd>
34<info>By default, blank lines are preserved in a formatted document.</info>
36<step><cmd>Select <uicontrol>Indent using tabs</uicontrol> if you want to
37use tab characters (\t) as the standard formatting indentation, or, if you
38prefer to use spaces, select <uicontrol>Indent using spaces</uicontrol>.</cmd>
40<step><cmd>You can also specify the <uicontrol>Indentation size</uicontrol> which
41is the number of tabs or space characters used for formatting indentation.</cmd>
kpriceb59c9f62008-04-02 21:24:37 +000043<step><cmd>You can specify certain characters (the default command<?Pub Caret?>
44is &lt;=) that will cause the content assist list to pop up automatically.
45Ensure the <uicontrol>Automatically make suggestions</uicontrol> check box
46is selected and specify the characters in the <uicontrol>Prompt when these
47characters are inserted</uicontrol> field. </cmd></step>
kpriceef160682006-08-29 18:08:31 +000048<step><cmd>If you select <b>Strict</b> from the <b>Suggestion strategy</b> list,
49suggestions that are grammatically valid will be shown first (with bold icons)
50in the content assist list. Other suggestions that are applicable to the element
51scope, but not grammatically valid, will be shown below them with a de-emphasized
kpriceb80ff2a2006-09-18 19:22:32 +000052icon. The default value for this field is <b>Strict</b>.</cmd></step>
kpriceef160682006-08-29 18:08:31 +000053<step><cmd>The <uicontrol>Use inferred grammar in absence of DTD/Schema</uicontrol> check
54box is selected by default. </cmd><info>If this box is selected, when you
55have an XML file that is not associated with a DTD or XML schema, you will
56still be able to get content assist - the tool will infer what should come
57next in your file based on the existing content.</info></step>
58<step><cmd>Click <uicontrol>Apply</uicontrol> and then <uicontrol>OK</uicontrol> to
59save your changes.</cmd></step>
kpriceb59c9f62008-04-02 21:24:37 +000063<?Pub *0000003659?>