1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
<chapter id="xmltools">
<chapterinfo>
<title>&XML; Completion</title>
<authorgroup>
<author>
<firstname>Daniel</firstname>
<surname>Naber</surname>
<affiliation>
<address>&Daniel.Naber.mail;</address>
</affiliation>
</author>
</authorgroup>
<date>2006-05-17</date>
<releaseinfo>3.5.2</releaseinfo>
<abstract>
<para>This plugin supports writing &XML; files by listing allowed tags
and more.</para>
</abstract>
<keywordset>
<keyword>KDE</keyword>
<keyword>kate</keyword>
<keyword>xml</keyword>
</keywordset>
</chapterinfo>
<title>Introduction</title>
<para>This plugin gives hints about what is allowed at a certain position in
an &XML; file, according to the file's DTD. It will list possible
elements, attributes, attribute values or entities, depending on the
cursor position (⪚ all entities are listed if the character on the left
of the cursor is <quote>&</quote>). It's also possible to close the nearest
open tag on the left.</para>
<para>The <acronym>DTD</acronym> must exist in &XML; format, as produced by the Perl program
<command>dtdparse</command>. We will call a DTD in this format <quote>meta DTD</quote>.
Some meta DTDs are supplied. They are installed in
<filename class="directory">$KDEDIR/share/apps/katexmltools/</filename>,
which is also the default folder when you choose
<guimenuitem>Assign Meta DTD...</guimenuitem>.
To produce your own meta DTDs, get <command>dtdparse</command> from
<ulink url="http://dtdparse.sourceforge.net">http://dtdparse.sourceforge.net</ulink>.</para>
<sect1 id="xmltools-how-to-use">
<title>How to Use</title>
<para>Start &kate; and open the configuration dialog under <menuchoice><guimenu>Settings</guimenu>
<guimenuitem>Configure &kate;...</guimenuitem></menuchoice>.
Then select <guilabel>Kate XML Completion</guilabel> which will appear
in the <guilabel>Application</guilabel>/<guilabel>Plugins</guilabel> section and close the dialog. After
that, select <menuchoice><guimenu>XML</guimenu><guimenuitem>Assign Meta DTD...</guimenuitem></menuchoice>.
If your document contains no <quote>DOCTYPE</quote> or the doctype is unknown, you'll have to
select a meta DTD from the file system. Otherwise the meta DTD that
matches the current document's DOCTYPE will be loaded automatically.</para>
<para>You can now use the plugin while typing your text:</para>
<variablelist>
<varlistentry>
<term>< (less than key)</term>
<listitem><para>This will trigger a list of possible elements unless the
cursor is inside a tag already. Note that you currently cannot use
this to insert the top level element (⪚ <quote><html></quote>).</para></listitem>
</varlistentry>
<varlistentry>
<term>" (quote key)</term>
<listitem><para>The quote key will trigger a list of possible attribute
values (if there are some) if you are inside a tag.</para></listitem>
</varlistentry>
<varlistentry>
<term>(space key)</term>
<listitem><para>This key will trigger a list of possible attributes for the
current element if you are inside a tag.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>& (ampersand key)</term>
<listitem><para>This key will trigger a list of named entities.</para></listitem>
</varlistentry>
</variablelist>
</sect1>
<sect1 id="xmltools-features-and-limitations">
<title>Features and Limitations</title>
<para>You can test all functions and limitations by loading
<filename>$KDEDIR/share/apps/katexmltools/testcases.xml</filename>
into &kate; and following the instructions. Note that working with
more than one view per document is not yet correctly supported by
this plugin.</para>
</sect1>
<sect1 id="xmltools-menu">
<title>Menu Structure</title>
<variablelist>
<varlistentry>
<term>
<menuchoice>
<shortcut>
<keycombo action="simul">&Ctrl;<keycap>Return</keycap></keycombo>
</shortcut>
<guimenu>XML</guimenu>
<guimenuitem>Insert Element...</guimenuitem>
</menuchoice>
</term>
<listitem><para>This will open a dialog that lets you insert an &XML; element.
The <, > characters and the closing tag will be inserted automatically.
If you have selected text when this menu item is selected, the selected
text will be surrounded by the opening and the closing tag.
The dialog also offers completion of all elements that may be inserted
at the current cursor position if you have assigned a meta DTD by
using <guimenuitem>Assign Meta DTD...</guimenuitem>.
</para></listitem>
</varlistentry>
<varlistentry>
<term>
<menuchoice>
<shortcut>
<keycombo action="simul">&Ctrl;<keycap><</keycap></keycombo>
</shortcut>
<guimenu>XML</guimenu>
<guimenuitem>Close Element</guimenuitem>
</menuchoice>
</term>
<listitem><para>This will search your text for a tag that is not yet closed
and will close it by inserting the corresponding closing tag.
The search starts at the cursor position and goes left. If
it cannot find an open tag nothing will happen.</para></listitem>
</varlistentry>
<varlistentry>
<term>
<menuchoice>
<guimenu>XML</guimenu>
<guimenuitem>Assign Meta DTD...</guimenuitem>
</menuchoice>
</term>
<listitem><para>This will tell the plugin which meta DTD to use for the
current document. Note that this assignment will not be saved.
You will have to repeat it when you start &kate; the next time.</para></listitem>
</varlistentry>
</variablelist>
</sect1>
<sect1 id="xmltools-thanks-and-acknowledgements">
<title>Thanks and Acknowledgments</title>
<para>
&kate; Plugin <quote>XML Completion</quote> copyright 2001,2002 &Daniel.Naber;
&Daniel.Naber.mail;.
</para>
<para>
Documentation copyright 2001,2002 &Daniel.Naber;
</para>
<!-- TRANS:CREDIT_FOR_TRANSLATORS -->
<!-- &underFDL; -->
&underGPL;
</sect1>
</chapter>
<!--
Local Variables:
mode: sgml
sgml-omittag: nil
sgml-shorttag: t
End:
-->
|