• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3   Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
4
5   Distributed under the Boost Software License, Version 1.0.
6   (See accompanying file LICENSE_1_0.txt or copy at
7   http://www.boost.org/LICENSE_1_0.txt)
8  -->
9<xsl:stylesheet        xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
10  <xsl:output method="xml" version="1.0" indent="yes" standalone="yes" />
11
12  <xsl:template match="/">
13    <doxygen>
14      <xsl:attribute name="version">
15        <xsl:choose>
16          <xsl:when test="doxygen">
17            <xsl:value-of select="doxygen/attribute::version"/>
18          </xsl:when>
19          <xsl:otherwise>
20            <xsl:value-of select="doxygenindex/attribute::version"/>
21          </xsl:otherwise>
22        </xsl:choose>
23      </xsl:attribute>
24
25      <!-- Load all doxgen generated xml files -->
26      <xsl:for-each select="doxygen/compound">
27        <xsl:variable name="id">
28          <xsl:choose>
29            <xsl:when test="@refid">
30              <xsl:value-of select="@refid"/>
31            </xsl:when>
32            <xsl:when test="@id">
33              <xsl:value-of select="@id"/>
34            </xsl:when>
35          </xsl:choose>
36        </xsl:variable>
37        <xsl:if test="$id">
38          <xsl:copy-of select="document( concat( $id, '.xml' ), / )/doxygen/*" />
39        </xsl:if>
40      </xsl:for-each>
41      <xsl:for-each select="doxygenindex/compound">
42        <xsl:variable name="id">
43          <xsl:choose>
44            <xsl:when test="@refid">
45              <xsl:value-of select="@refid"/>
46            </xsl:when>
47            <xsl:when test="@id">
48              <xsl:value-of select="@id"/>
49            </xsl:when>
50          </xsl:choose>
51        </xsl:variable>
52        <xsl:if test="$id">
53          <xsl:copy-of select="document( concat($id, '.xml'), /)/doxygen/*" />
54        </xsl:if>
55      </xsl:for-each>
56    </doxygen>
57  </xsl:template>
58</xsl:stylesheet>
59