# XML Completion

Daniel
Naber

    daniel.naber@t-online.de

2006-01-10
0.90.00

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

KDE
kate
xml

# Introducción

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 (&eg; 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.

## Cómo utilizarlo

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.

Ahora ya puede utilizar la extensión mientras introduce texto:

< (tecla menor que)

  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>).

" (tecla de comillas)

  La tecla de comillas abrirá una lista con los posibles valores del atributo (si es que existen) si se encuentra dentro de una etiqueta.

(tecla de espacio)

  Esta tecla abrirá una lista de posibles atributos para el elemento actual si se encuentra dentro de una etiqueta.

& (tecla de ampersand)

  Este tecla abrirá una lista de entidades nombradas.

## Características y limitaciones

Puede probar todas las funciones y limitaciones cargando `$KDEDIR/share/apps/katexmltools/testcases.xml` en &kate; y siguiendo las instrucciones. Tenga en cuenta que trabajar con más de una vista por documento no está todavía correctamente soportado por esta extensión.

## Estructura de menús

&Ctrl;Entrar XML Insertar elemento...

  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 Assign Meta DTD....

&Ctrl;< XML Cerrar elemento

  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 can't find an open tag nothing will happen.

XML Asignar meta DTD...

  Le comunica a la extensión qué meta DTD debe utilizar en todos los documentos abiertos. Tenga en cuenta que esta asignación no será almacenada y deberá repetirla la próxima vez que inicie &kate;.

## Agradecimientos y reconocimientos

&kate; Plugin XML Completion copyright 2001,2002 Daniel Naber daniel.naber@t-online.de.

Documentation copyright 2001,2002 Daniel Naber

Traducido por Rafael Osuna rosuna@wol.es.

Traducido por Miguel Revilla Rodríguez yo@miguelrevilla.com.

Traducido por José Cohen Cohen yosilnx@yahoo.com.

Traducido por Santiago Fernández Sancho santi@kde-es.org.

&underGPL;