&XML; Completion
Daniel
Naber
&Daniel.Naber.mail;
2006-05-17
3.5.2
This plugin supports writing &XML; files by listing allowed tags
and more.
KDE
kate
xml
Introduction
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 &
). It's also possible to close the nearest
open tag on the left.
The DTD must exist in &XML; format, as produced by the Perl program
dtdparse. We will call a DTD in this format meta DTD
.
Some meta DTDs are supplied. They are installed in
$TDEDIR/share/apps/katexmltools/,
which is also the default folder when you choose
Assign Meta DTD....
To produce your own meta DTDs, get dtdparse from
http://dtdparse.sourceforge.net.
How to Use
Start &kate; and open the configuration dialog under Settings
Configure &kate;....
Then select Kate XML Completion which will appear
in the Application/Plugins section and close the dialog. After
that, select XMLAssign Meta DTD....
If your document contains no DOCTYPE
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.
You can now use the plugin while typing your text:
< (less than key)
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 (⪚ <html>
).
" (quote key)
The quote key will trigger a list of possible attribute
values (if there are some) if you are inside a tag.
(space key)
This key will trigger a list of possible attributes for the
current element if you are inside a tag.
& (ampersand key)
This key will trigger a list of named entities.
Features and Limitations
You can test all functions and limitations by loading
$TDEDIR/share/apps/katexmltools/testcases.xml
into &kate; and following the instructions. Note that working with
more than one view per document is not yet correctly supported by
this plugin.
Thanks and Acknowledgments
&kate; Plugin XML Completion
copyright 2001,2002 &Daniel.Naber;
&Daniel.Naber.mail;.
Documentation copyright 2001,2002 &Daniel.Naber;
&underGPL;