XML Completion
Prev
Next

XML Completion

Daniel Naber

Revision 0.90.00 (2002-07-20)

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 (e.g. 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 $KDEDIR/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 select Kate XML Completion which will appear in the Application/Plugins section under Settings->Configure Kate... After that, select XML Plugin->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 (e.g. “<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 make a comment or contribute an update to this page?
Send feedback to the KDE Docs Team