<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="text"/>

<xsl:template match="classes"><xsl:apply-templates select="class"/></xsl:template>

<xsl:template match="class"><xsl:document href="man3wx/{@name}.3wx" method="text">.\" This is a wxWidgets manpage page generated from the XML docs
.TH <xsl:value-of select="@name"/> 3wx 2005-02-15 "wxWidgets" "wxWidgets class documentation"
.SH NAME
<xsl:value-of select="@name"/> \- <xsl:value-of select="shortdesc"/>
.SH DESCRIPTION
<xsl:apply-templates select="description"/>
<xsl:apply-templates select="remarks"/>
<xsl:apply-templates select="note"/>
.SH "PARENTS"
<xsl:apply-templates select="parents"/>
<xsl:apply-templates select="friends"/>
<xsl:apply-templates select="library"/>
.SH "INCLUDE FILES"
<xsl:apply-templates select="includes"/>
.SH MEMBERS
<xsl:apply-templates select="members"/>
<xsl:apply-templates select="example"/>
<xsl:apply-templates select="windowstyles"/>
<xsl:apply-templates select="events"/>
.SH "SEE ALSO"
<xsl:apply-templates select="parents"/>
<xsl:apply-templates select="seealso"/>
.SH "AUTHORS"
Documentation content by Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al

Conversion to manpage format by Arnout Engelen (http://bzzt.net), bugreports welcome.
</xsl:document></xsl:template>



<xsl:template match="description">
<!-- TODO templates maken voor alle mogelijke elementen -->
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="table">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="tr">
<xsl:apply-templates/><xsl:text>
</xsl:text>
</xsl:template>
<xsl:template match="td">
<xsl:value-of select="."/>
</xsl:template>

<xsl:template match="pre">
<xsl:value-of select="."/>
</xsl:template>

<xsl:template match="includes">
<xsl:apply-templates select="header"/>
</xsl:template>

<xsl:template match="header">
<xsl:value-of select="@name"/> <xsl:value-of select="@comment"/>
</xsl:template>

<xsl:template match="member">
<xsl:apply-templates select="function"/>
</xsl:template>

<xsl:template match="function">
.SS <xsl:value-of select="@type"/><xsl:text> </xsl:text><xsl:value-of select="@name"/> (<xsl:for-each select="parameters/parameter"> <xsl:value-of select="@type"/> <xsl:value-of select="@name"/> <xsl:if test="@value"> = <xsl:value-of select="@value"/></xsl:if>
  </xsl:for-each>)
<xsl:apply-templates select="description"/>
</xsl:template>

<xsl:template match="style">
.SS <xsl:value-of select="@name"/><xsl:text>
</xsl:text>
<xsl:value-of select="."/>
</xsl:template>

<xsl:template match="event">
.SS <xsl:value-of select="@name"/><xsl:text>
</xsl:text>
<xsl:value-of select="."/>
</xsl:template>

<xsl:template match="example">
.SH EXAMPLE
<xsl:value-of select="."/>
</xsl:template>

<xsl:template match="remarks">
.SH REMARKS
<xsl:value-of select="."/>
</xsl:template>

<xsl:template match="note">
.SH NOTE
<xsl:value-of select="."/>
</xsl:template>

<xsl:template match="windowstyles">
.SH "WINDOW STYLES"
<xsl:apply-templates select="style"/>
</xsl:template>

<xsl:template match="library">
.SH LIBRARY
<xsl:value-of select="."/>
</xsl:template>

<xsl:template match="friends">
.SH FRIENDS
<xsl:value-of select="."/>
</xsl:template>

<xsl:template match="events">
.SH EVENTS
<xsl:apply-templates  select="event"/>
</xsl:template>

<xsl:template match="p"><xsl:text>

</xsl:text>
<xsl:apply-templates/>
</xsl:template>


</xsl:stylesheet>

