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 (for example, 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
.
To produce your own meta DTDs, get dtdparse from
http://dtdparse.sourceforge.net.
Start Kate and open the configuration dialog under ->. Then select Kate XML Completion which will appear in the Application/Plugins section and close the dialog. After that, select ->. 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:
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 (for example, “<html>”).
The quote key will trigger a list of possible attribute values (if there are some) if you are inside a tag.
This key will trigger a list of possible attributes for the current element if you are inside a tag.
This key will trigger a list of named entities.
Would you like to comment or contribute an update to this page?
Send feedback to the TDE Development Team