Title: XML Documents
Author: mitcho (Michael Yoshitaka Erlewine)
Published: <strong>27 de Maio, 2011</strong>
Last modified: 31 de Maio, 2011

---

Buscar plugins

Este plugin **non se actualizou en máis de 2 anos**. É posible que xa non sexa compatible
ou mantido por ninguén, ou podes ter problemas de compatibilidade cando se usa con
novas versións de WordPress.

![](https://s.w.org/plugins/geopattern-icon/xml-documents.svg)

# XML Documents

 Por [mitcho (Michael Yoshitaka Erlewine)](https://profiles.wordpress.org/mitchoyoshitaka/)

[Descargar](https://downloads.wordpress.org/plugin/xml-documents.0.2.zip)

 * [Detalles](https://gl.wordpress.org/plugins/xml-documents/#description)
 * [Valoracións](https://gl.wordpress.org/plugins/xml-documents/#reviews)
 *  [Instalación](https://gl.wordpress.org/plugins/xml-documents/#installation)
 * [Desenvolvemento](https://gl.wordpress.org/plugins/xml-documents/#developers)

 [Soporte](https://wordpress.org/support/plugin/xml-documents/)

## Descrición

This plugin adds the necessary infrastructure to add a “XML Document”-type custom
post type which renders an XML document with an XSLT stylesheet in lieu of the regular
post content. This can be useful in custom applications where there is a need to
display XML documents from source, but you also want the regular benefits of WordPress
tagging, commenting, etc. for these documents.

This plugin will not work out of the box… it is an infrastructure plugin. Additional
coding (albeit minor) is necessary to get it running. See the “Installation” section
for more information and sample code.

The development of this plugin is supported by [MIT Global Shakespeares](http://globalshakespeares.org),
where it will be used to render the full text of Shakespeare plays from TEI-XML 
source.

### To-do

 * Custom stylesheets, per-document and/or custom parameters to be passed to the
   XSL transform
 * Search integration

## Capturas

[⌊A custom post type with XML Document support: here, "Scripts" for the display 
of Shakespeare scripts.⌉⌊A custom post type with XML Document support: here, "Scripts"
for the display of Shakespeare scripts.⌉[

A custom post type with XML Document support: here, “Scripts” for the display of
Shakespeare scripts.

[⌊Selecting an uploaded XML Document as the document to be rendered.⌉⌊Selecting 
an uploaded XML Document as the document to be rendered.⌉[

Selecting an uploaded XML Document as the document to be rendered.

## Instalación

 1. Make sure you have PHP5 and [the PHP XSL module](http://us3.php.net/xsl) installed.
 2. Install and activate this plugin.
 3. Create a new custom post type with the `supports` attribute `xmldoc`. This custom
    post type will completely ignore its `post_content`, so make sure its `supports`
    statement does not include `editor`.
 4. Place your stylesheet in your current theme’s directory, named as `stylesheet.xsl`.
 5. Create a new entity of your new post type. There will be an option to upload and
    choose an XML document (see screenshots). Do that, publish it, and view it, and
    you will see the XML document rendered with the XSLT as the content of that entry.

Here’s some sample code:

    ```
    register_post_type('script',
        array(
            'label' => 'Scripts',
            'public' => true,
            'hierarchical' => false,
            'supports' => array('title', 'comments', 'xmldoc')
        )
    );
    ```

For more information on `register_post_type` and Custom Post Types, [visit the Codex](https://codex.wordpress.org/Post_Types).

## Preguntas frecuentes

  Your question here!

Our answer here!

## Comentarios

Non hai recensións para este plugin.

## Colaboradores e desenvolvedores

“XML Documents” é un software de código aberto. As seguintes persoas colaboraron
con este plugin.

Colaboradores

 *   [ mitcho (Michael Yoshitaka Erlewine) ](https://profiles.wordpress.org/mitchoyoshitaka/)

[Traduce “XML Documents” ao teu idioma.](https://translate.wordpress.org/projects/wp-plugins/xml-documents)

### Interesado no desenvolvemento?

[Revisa o código](https://plugins.trac.wordpress.org/browser/xml-documents/), bota
unha ollada ao[repositorio SVN](https://plugins.svn.wordpress.org/xml-documents/),
ou subscríbete ao [log de desenvolvemento](https://plugins.trac.wordpress.org/log/xml-documents/)
por [RSS](https://plugins.trac.wordpress.org/log/xml-documents/?limit=100&mode=stop_on_copy&format=rss).

## Rexistro de cambios

#### 0.2

 * A couple bugfixes for the admin interface.

#### 0.1

 * Initial public release.

## Meta

 *  Versión **0.2**
 *  Última actualización **Fai 15 anos**
 *  Instalacións activas **10+**
 *  Versión de WordPress ** 3.1 ou superior **
 *  Probado ata **3.2.1**
 *  Idioma
 * [English (US)](https://wordpress.org/plugins/xml-documents/)
 * Etiquetas
 * [cpt](https://gl.wordpress.org/plugins/tags/cpt/)[custom post type](https://gl.wordpress.org/plugins/tags/custom-post-type/)
   [tei](https://gl.wordpress.org/plugins/tags/tei/)[xml](https://gl.wordpress.org/plugins/tags/xml/)
   [xslt](https://gl.wordpress.org/plugins/tags/xslt/)
 *  [Vista avanzada](https://gl.wordpress.org/plugins/xml-documents/advanced/)

## Valoracións

Aínda non se enviaron valoracións.

[Your review](https://wordpress.org/support/plugin/xml-documents/reviews/#new-post)

[Ver todas as valoracións](https://wordpress.org/support/plugin/xml-documents/reviews/)

## Colaboradores

 *   [ mitcho (Michael Yoshitaka Erlewine) ](https://profiles.wordpress.org/mitchoyoshitaka/)

## Soporte

Tes algo que dicir? Necesitas axuda?

 [Ver o foro de soporte](https://wordpress.org/support/plugin/xml-documents/)