XML Completion
Prev
Next

XML Completion

Daniel Naber

Revision 3.5.2 (2006-05-17)

This plugin supports writing XML files by listing allowed tags and more.

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 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 XML->Assign 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 (for example,<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.

Prev
Next
Home


Would you like to comment or contribute an update to this page?
Send feedback to the TDE Development Team