kprice | ef16068 | 2006-08-29 18:08:31 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?>
|
kprice | b59c9f6 | 2008-04-02 21:24:37 +0000 | [diff] [blame] | 2 | <!--Arbortext, Inc., 1988-2006, v.4002-->
|
kprice | b80ff2a | 2006-09-18 19:22:32 +0000 | [diff] [blame] | 3 | <!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN"
|
| 4 | "task.dtd">
|
kprice | ef16068 | 2006-08-29 18:08:31 +0000 | [diff] [blame] | 5 | <task id="txprefs" xml:lang="en-us">
|
| 6 | <title>Defining XML editor preferences</title>
|
| 7 | <titlealts>
|
| 8 | <searchtitle>Defining XML editor preferences</searchtitle>
|
| 9 | </titlealts>
|
| 10 | <shortdesc>You can set various preferences for the Source view of the XML
|
| 11 | editor such as the formatter indentation style, line wrapping rules, and content
|
kprice | b59c9f6 | 2008-04-02 21:24:37 +0000 | [diff] [blame] | 12 | assist rules. To apply the formatting styles, right-click in the Source view
|
| 13 | for your XML document, and click <menucascade><uicontrol>Format</uicontrol>
|
kprice | ef16068 | 2006-08-29 18:08:31 +0000 | [diff] [blame] | 14 | <uicontrol>Document</uicontrol></menucascade>.</shortdesc>
|
| 15 | <prolog><metadata>
|
kprice | 9623e9d | 2007-05-03 03:43:05 +0000 | [diff] [blame] | 16 | <keywords><indexterm>XML editor<indexterm>preferences</indexterm></indexterm>
|
kprice | b59c9f6 | 2008-04-02 21:24:37 +0000 | [diff] [blame] | 17 | <indexterm>preferences<indexterm>XML editor</indexterm></indexterm></keywords>
|
kprice | ef16068 | 2006-08-29 18:08:31 +0000 | [diff] [blame] | 18 | </metadata></prolog>
|
| 19 | <taskbody>
|
kprice | b59c9f6 | 2008-04-02 21:24:37 +0000 | [diff] [blame] | 20 | <context><p>To define XML preferences, complete the following steps:</p></context>
|
kprice | ef16068 | 2006-08-29 18:08:31 +0000 | [diff] [blame] | 21 | <steps>
|
| 22 | <step><cmd>Click <menucascade><uicontrol>Window</uicontrol><uicontrol>Preferences</uicontrol>
|
kprice | b59c9f6 | 2008-04-02 21:24:37 +0000 | [diff] [blame] | 23 | </menucascade> and select <menucascade><uicontrol>XML</uicontrol><uicontrol>XML
|
| 24 | Files</uicontrol><uicontrol>Editor</uicontrol></menucascade>.</cmd></step>
|
kprice | ef16068 | 2006-08-29 18:08:31 +0000 | [diff] [blame] | 25 | <step><cmd>Enter a maximum width for formatted lines in the <uicontrol>Line
|
| 26 | width</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
|
| 28 | start every attribute on a new line.</cmd></step>
|
kprice | b59c9f6 | 2008-04-02 21:24:37 +0000 | [diff] [blame] | 29 | <step><cmd>Select <uicontrol>Preserve whitespace in tags with PCDATA content</uicontrol> to
|
| 30 | prevent the editor from deleting whitespace in elements that contain parsed
|
| 31 | character data.</cmd></step>
|
kprice | ef16068 | 2006-08-29 18:08:31 +0000 | [diff] [blame] | 32 | <step><cmd>If you want blank lines to be removed when the document is formatted,
|
| 33 | select the <uicontrol>Clear all blank lines</uicontrol> check box. </cmd>
|
| 34 | <info>By default, blank lines are preserved in a formatted document.</info>
|
| 35 | </step>
|
| 36 | <step><cmd>Select <uicontrol>Indent using tabs</uicontrol> if you want to
|
| 37 | use tab characters (\t) as the standard formatting indentation, or, if you
|
| 38 | prefer to use spaces, select <uicontrol>Indent using spaces</uicontrol>.</cmd>
|
| 39 | </step>
|
| 40 | <step><cmd>You can also specify the <uicontrol>Indentation size</uicontrol> which
|
| 41 | is the number of tabs or space characters used for formatting indentation.</cmd>
|
| 42 | </step>
|
kprice | b59c9f6 | 2008-04-02 21:24:37 +0000 | [diff] [blame] | 43 | <step><cmd>You can specify certain characters (the default command<?Pub Caret?>
|
| 44 | is <=) that will cause the content assist list to pop up automatically.
|
| 45 | Ensure the <uicontrol>Automatically make suggestions</uicontrol> check box
|
| 46 | is selected and specify the characters in the <uicontrol>Prompt when these
|
| 47 | characters are inserted</uicontrol> field. </cmd></step>
|
kprice | ef16068 | 2006-08-29 18:08:31 +0000 | [diff] [blame] | 48 | <step><cmd>If you select <b>Strict</b> from the <b>Suggestion strategy</b> list,
|
| 49 | suggestions that are grammatically valid will be shown first (with bold icons)
|
| 50 | in the content assist list. Other suggestions that are applicable to the element
|
| 51 | scope, but not grammatically valid, will be shown below them with a de-emphasized
|
kprice | b80ff2a | 2006-09-18 19:22:32 +0000 | [diff] [blame] | 52 | icon. The default value for this field is <b>Strict</b>.</cmd></step>
|
kprice | ef16068 | 2006-08-29 18:08:31 +0000 | [diff] [blame] | 53 | <step><cmd>The <uicontrol>Use inferred grammar in absence of DTD/Schema</uicontrol> check
|
| 54 | box is selected by default. </cmd><info>If this box is selected, when you
|
| 55 | have an XML file that is not associated with a DTD or XML schema, you will
|
| 56 | still be able to get content assist - the tool will infer what should come
|
| 57 | next in your file based on the existing content.</info></step>
|
| 58 | <step><cmd>Click <uicontrol>Apply</uicontrol> and then <uicontrol>OK</uicontrol> to
|
| 59 | save your changes.</cmd></step>
|
| 60 | </steps>
|
| 61 | </taskbody>
|
| 62 | </task>
|
kprice | b59c9f6 | 2008-04-02 21:24:37 +0000 | [diff] [blame] | 63 | <?Pub *0000003659?>
|