summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/asio/src/doc/asioref.xsl
blob: 09c6fefa45b818326ca763b9e95575c185d89d6c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<!--
  Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)

  Distributed under the Boost Software License, Version 1.0. (See accompanying
  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-->

<xsl:output method="xml"/>
<xsl:strip-space elements="title"/>

<xsl:param name="asio.version">X.Y.Z</xsl:param>

<xsl:template match="@*|node()">
  <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
  </xsl:copy>
</xsl:template>

<xsl:template match="blockquote/para">
  <xsl:apply-templates select="para"/>
</xsl:template>

<xsl:template match="title/link">
  <xsl:value-of select="normalize-space(.)"/>
</xsl:template>

<xsl:template match="bridgehead[count(link) &gt; 0]">
  <xsl:element name="bridgehead">
    <xsl:attribute name="renderas">
      <xsl:value-of select="@renderas"/>
    </xsl:attribute>
    <xsl:value-of select="normalize-space(link)"/>
  </xsl:element>
</xsl:template>

<xsl:template match="chapter">
  <article id="asio" name="Asio Reference Manual" dirname="asio">
    <xsl:apply-templates select="chapterinfo"/>
    <title>Asio Reference Manual</title>
    <xsl:apply-templates select="section"/>
  </article>
</xsl:template>

<xsl:template match="chapterinfo">
  <articleinfo>
    <xsl:apply-templates select="*"/>
    <subtitle><xsl:value-of select="$asio.version"/></subtitle>
  </articleinfo>
</xsl:template>

<xsl:template match="section[@id='asio.reference']/informaltable">
  <xsl:element name="informaltable">
    <xsl:attribute name="role">scriptsize</xsl:attribute>
    <xsl:apply-templates select="*"/>
  </xsl:element>
</xsl:template>

<xsl:template match="section[@id='asio.examples']/*/listitem">
  <xsl:element name="listitem">
    <xsl:value-of select="substring-after(normalize-space(ulink), '../')"/>
  </xsl:element>
</xsl:template>

<xsl:template match="imagedata">
  <xsl:element name="imagedata">
    <xsl:attribute name="fileref">
      <xsl:value-of select="@fileref"/>
    </xsl:attribute>
    <xsl:attribute name="scale">75</xsl:attribute>
    <xsl:attribute name="align">center</xsl:attribute>
  </xsl:element>
</xsl:template>

<xsl:template match="programlisting/phrase">
  <xsl:apply-templates/>
</xsl:template>

<xsl:template match="programlisting/link">
  <xsl:apply-templates/>
</xsl:template>

<xsl:template match="programlisting/emphasis">
  <xsl:if test="not(contains(., 'more...'))">
    <emphasis><xsl:apply-templates/></emphasis>
  </xsl:if>
</xsl:template>

<xsl:template match="section[@id='asio.index']"></xsl:template>

</xsl:stylesheet>