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-->
|
| 3 | <!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN"
|
| 4 | "task.dtd">
|
kprice | ef16068 | 2006-08-29 18:08:31 +0000 | [diff] [blame] | 5 | <?Pub Inc?>
|
| 6 | <task id="txedtdes" xml:lang="en-us">
|
| 7 | <title>Editing in the Design view</title>
|
| 8 | <titlealts>
|
| 9 | <searchtitle>Editing in the Design view</searchtitle>
|
| 10 | </titlealts>
|
| 11 | <shortdesc>The XML editor has a Design view, which represents the XML file
|
| 12 | simultaneously as a table and a tree. This helps make navigation and editing
|
| 13 | easier. Content and attribute values can be edited directly in the table cells,
|
| 14 | while pop-up menus on the tree elements give alternatives that are valid for
|
| 15 | that particular element.</shortdesc>
|
| 16 | <prolog><metadata>
|
kprice | 9623e9d | 2007-05-03 03:43:05 +0000 | [diff] [blame] | 17 | <keywords><indexterm>XML editor<indexterm>Design view</indexterm></indexterm>
|
| 18 | </keywords>
|
kprice | ef16068 | 2006-08-29 18:08:31 +0000 | [diff] [blame] | 19 | </metadata></prolog>
|
| 20 | <taskbody>
|
kprice | b59c9f6 | 2008-04-02 21:24:37 +0000 | [diff] [blame] | 21 | <context><p>For example, the <uicontrol>Add child</uicontrol> menu item will
|
kprice | ef16068 | 2006-08-29 18:08:31 +0000 | [diff] [blame] | 22 | list only those elements from a DTD or XML schema which would be valid children
|
| 23 | at that point.</p><p>When you have an XML file associated with an XML schema
|
| 24 | or DTD file, certain tags and rules for that file have already been established,
|
| 25 | which is why the Design view can provide prompts (via a pop-up menu) for those
|
| 26 | tags. When you create an XML file that is not associated with an XML schema
|
| 27 | or DTD file, it has no tags or rules associated with it, so the Design view
|
| 28 | cannot provide prompts for specific tags, but it can provide prompts to create
|
| 29 | new elements and attributes.</p><p>For any XML file associated with an XML
|
| 30 | schema or DTD file, you can use the Design view to add any items defined in
|
| 31 | the XML schema or DTD (such as elements and attributes) to the XML file. You
|
kprice | b59c9f6 | 2008-04-02 21:24:37 +0000 | [diff] [blame] | 32 | can also use it to add processing instructions and comments to all XML files.</p><p>To
|
| 33 | open and edit a XML file in the XML editor, right-click the file in the Navigator
|
| 34 | view and click <uicontrol>Open With > XML Editor</uicontrol>. If necessary,
|
| 35 | click the <uicontrol>Design</uicontrol> tab to open the Design view.</p><p>To
|
| 36 | expand all the items in your XML file, click <menucascade><uicontrol>XML</uicontrol>
|
| 37 | <uicontrol>Expand All</uicontrol></menucascade> <image href="../images/expand_all.gif">
|
| 38 | <alt>This graphic is the Expand All toolbar button</alt></image> on the toolbar.
|
| 39 | To collapse them, click the <menucascade><uicontrol>XML</uicontrol><uicontrol>Collapse
|
| 40 | A<?Pub Caret?>ll</uicontrol></menucascade> <image href="../images/collapse_all.gif">
|
| 41 | <alt>This graphic is the Collapse All toolbar button</alt></image> on the
|
| 42 | toolbar.</p><p>If you right-click the item that you want to work with, some
|
kprice | ef16068 | 2006-08-29 18:08:31 +0000 | [diff] [blame] | 43 | or all of the following options (as applicable) will be available from the
|
kprice | b59c9f6 | 2008-04-02 21:24:37 +0000 | [diff] [blame] | 44 | pop-up menu that appears:</p><p></p><table>
|
| 45 | <tgroup cols="2"><colspec colname="col1" colwidth="48*"/><colspec colname="col2"
|
| 46 | colwidth="150*"/>
|
| 47 | <thead>
|
| 48 | <row valign="bottom">
|
| 49 | <entry colname="col1">Select this</entry>
|
| 50 | <entry colname="col2">If you want to do this</entry>
|
| 51 | </row>
|
| 52 | </thead>
|
| 53 | <tbody>
|
| 54 | <row>
|
| 55 | <entry colname="col1">Add DTD Information</entry>
|
| 56 | <entry colname="col2">Associate the XML file with a DTD.</entry>
|
| 57 | </row>
|
| 58 | <row>
|
| 59 | <entry colname="col1">Edit DOCTYPE</entry>
|
| 60 | <entry colname="col2">Edit the DOCTYPE declaration. Refer to the related task
|
| 61 | for more details. For more information, see <xref format="html" href="tedtdoc.dita"
|
| 62 | scope="peer">Editing DOCTYPE declarations</xref>.</entry>
|
| 63 | </row>
|
| 64 | <row>
|
| 65 | <entry colname="col1">Edit Namespaces</entry>
|
| 66 | <entry colname="col2">Edit the existing namespace information or create a
|
| 67 | new association with a namespace. Refer to the related task for more details.
|
| 68 | For more information, see <xref format="html" href="tedtsch.dita" scope="peer">Editing
|
| 69 | namespace information</xref>.</entry>
|
| 70 | </row>
|
| 71 | <row>
|
| 72 | <entry colname="col1">Edit Processing Instruction</entry>
|
| 73 | <entry colname="col2">Edit the processing instruction. Refer to the related
|
| 74 | task for more details. For more information, see <xref format="html" href="tedtproc.dita"
|
| 75 | scope="peer">Editing XML processing instructions</xref>.</entry>
|
| 76 | </row>
|
| 77 | <row>
|
| 78 | <entry colname="col1">Remove</entry>
|
| 79 | <entry colname="col2">Remove the item that you have selected from the XML
|
| 80 | file. If the selected item or related items are defined so that the item must
|
| 81 | exist in the file, this option will not be available. For example, in your
|
| 82 | DTD, if you have declared that "One or more" of the item must always exist
|
| 83 | in your XML file, and the item you have selected is the only one that exists
|
| 84 | in your XML file.</entry>
|
| 85 | </row>
|
| 86 | <row>
|
| 87 | <entry colname="col1">Add Attribute</entry>
|
| 88 | <entry colname="col2">Add an attribute to the element that you selected. Any
|
| 89 | attributes you are allowed to add to the element will be listed. After you
|
| 90 | have added the attribute to the XML file, you can click in the right-hand
|
| 91 | column to change the value of the attribute. If the attribute has set values,
|
| 92 | they will appear in a list.</entry>
|
| 93 | </row>
|
| 94 | <row>
|
| 95 | <entry colname="col1">Add Child</entry>
|
| 96 | <entry colname="col2">Add another element, a comment, or a processing instruction
|
| 97 | as a child of the parent element.</entry>
|
| 98 | </row>
|
| 99 | <row>
|
| 100 | <entry colname="col1">Add Before</entry>
|
| 101 | <entry colname="col2">Add a child element, comment, or processing instruction
|
| 102 | that can go before the item you have selected. For example, if you have a
|
| 103 | parent element called <userinput>CD Collections</userinput> that can contain
|
| 104 | an unlimited amount of children called <userinput>CD</userinput>, you could
|
| 105 | click a <userinput>CD</userinput> element and click <menucascade><uicontrol>Add
|
| 106 | Before</uicontrol><uicontrol> CD</uicontrol></menucascade> , as a <userinput>CD</userinput> element
|
| 107 | can go before another <userinput>CD</userinput> element.</entry>
|
| 108 | </row>
|
| 109 | <row>
|
| 110 | <entry colname="col1">Add After</entry>
|
| 111 | <entry colname="col2">Add a child element, comment, or processing instruction
|
| 112 | that can go after the item you have selected. For example, if you have a parent
|
| 113 | element called <userinput>CD Collections</userinput> that can contain an unlimited
|
| 114 | amount of children called <userinput>CD</userinput>, you could click a <userinput>CD</userinput> element
|
| 115 | and click <menucascade><uicontrol>Add After</uicontrol><uicontrol> CD</uicontrol>
|
| 116 | </menucascade>, as a <userinput>CD</userinput> element can go after another <userinput>CD</userinput> element.</entry>
|
| 117 | </row>
|
| 118 | <row>
|
| 119 | <entry colname="col1">Replace With</entry>
|
| 120 | <entry colname="col2">Replace one item with another. This option is not available
|
| 121 | if you turn grammar constraints off or if there are no valid alternatives
|
| 122 | for you to replace the item with.</entry>
|
| 123 | </row>
|
| 124 | </tbody>
|
| 125 | </tgroup>
|
| 126 | </table></context>
|
kprice | ef16068 | 2006-08-29 18:08:31 +0000 | [diff] [blame] | 127 | <result><p>Any changes you make in the Design view are also reflected in the
|
kprice | b59c9f6 | 2008-04-02 21:24:37 +0000 | [diff] [blame] | 128 | Source view and the Outline view.</p><note>These instructions were written
|
| 129 | for the Resource perspective, but they will also work in many other perspectives.</note></result>
|
kprice | ef16068 | 2006-08-29 18:08:31 +0000 | [diff] [blame] | 130 | </taskbody>
|
| 131 | </task>
|
kprice | b59c9f6 | 2008-04-02 21:24:37 +0000 | [diff] [blame] | 132 | <?Pub *0000006781?>
|