1<!-- 2* © 2017 and later: Unicode, Inc. and others. 3* License & terms of use: http://www.unicode.org/copyright.html 4--> 5<!-- 6/* 7******************************************************************************* 8* Copyright (C) 2009-2011, International Business Machines Corporation and * 9* others. All Rights Reserved. * 10******************************************************************************* 11* This is an XSLT build file for ICU tools. 12*/ 13--> 14<!-- 15 List all C functions generated from the 'index.xml' 16--> 17<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 18 <xsl:param name="docFolder" /> 19 20 <xsl:template match="/"> 21 <list> 22 <xsl:variable name="files_node" select="/doxygenindex/compound[@kind='file']/@refid" /> 23 <xsl:for-each select="$files_node"> 24 <xsl:variable name="file" select="concat($docFolder, '/', . , '.xml')" /> 25 <xsl:variable name="funcs_node" select="document($file)/doxygen/compounddef/sectiondef/memberdef[@prot='public'][@kind='function']" /> 26 <xsl:for-each select="$funcs_node"> 27 <cppfunc> 28 <xsl:copy-of select="@id" /> 29 <xsl:attribute name="status"><xsl:value-of select="detaileddescription/para/xrefsect/xreftitle/text()"/></xsl:attribute> 30 <xsl:attribute name="version"><xsl:value-of select="detaileddescription/para/xrefsect/xrefdescription/para/text()"/></xsl:attribute> 31 <xsl:attribute name="prototype"><xsl:value-of select="concat(definition/text(), argsstring/text())" /></xsl:attribute> 32 <xsl:copy-of select="location/@file" /> 33 </cppfunc> 34 </xsl:for-each> 35 36 <!-- now get #defines --> 37 <xsl:variable name="defs_node" select="document($file)/doxygen/compounddef/sectiondef/memberdef[@prot='public'][@kind='define']" /> 38 <xsl:for-each select="$defs_node"> 39 <cppfunc> 40 <xsl:copy-of select="@id" /> 41 <xsl:attribute name="status"><xsl:value-of select="detaileddescription/para/xrefsect/xreftitle/text()"/></xsl:attribute> 42 <xsl:attribute name="version"><xsl:value-of select="detaileddescription/para/xrefsect/xrefdescription/para/text()"/></xsl:attribute> 43 <xsl:attribute name="prototype">#define <xsl:value-of select="name/text()" /></xsl:attribute> 44 <xsl:copy-of select="location/@file" /> 45 </cppfunc> 46 </xsl:for-each> 47 48 <!-- now enums --> 49 <xsl:variable name="enum_node" 50 select="document($file)/doxygen/compounddef/sectiondef/memberdef[@kind='enum'][@prot='public']" /> 51 <xsl:for-each select="$enum_node"> 52 53 <!-- use a name, else '(anonymous)' --> 54 <xsl:variable name="enum_node_name"> 55 <xsl:choose> 56 <xsl:when test="contains(name/text(), '@')"> 57 (anonymous)</xsl:when> 58 <xsl:otherwise> 59 <xsl:value-of select="name/text()" /></xsl:otherwise></xsl:choose> 60 </xsl:variable> 61 62 <!-- enum object --> 63 <xsl:variable name="enum_status" select="detaileddescription/para/xrefsect/xreftitle/text()"/> 64 <xsl:variable name="enum_version" select="detaileddescription/para/xrefsect/xrefdescription/para/text()"/> 65 66 <!-- no anonymous file level enums --><!-- 67 <xsl:if test="not(contains(name/text(), '@'))"> 68 <cppfunc> 69 <xsl:copy-of select="@id" /> 70 <xsl:attribute name="status"><xsl:value-of select="$enum_status" /></xsl:attribute> 71 <xsl:attribute name="version"><xsl:value-of select="$enum_status" /></xsl:attribute> 72 <xsl:attribute name="prototype">enum <xsl:value-of 73 select="$enum_node_name" /> {}</xsl:attribute> 74 <xsl:copy-of select="location/@file" /> 75 </cppfunc> 76 </xsl:if> 77 78 --><xsl:variable name="enum_node_file" select="location/@file" /> 79 80 81 <xsl:variable name="enum_member" select="enumvalue[@prot='public']"/> 82 83 <xsl:for-each select="$enum_member"> 84 <cppfunc> 85 <xsl:copy-of select="@id" /> 86 <!-- status and version: only override if set. --> 87 <xsl:attribute name="status"><xsl:choose> 88 <xsl:when test="detaileddescription/para/xrefsect/xreftitle/text() != ''"><xsl:value-of select="detaileddescription/para/xrefsect/xreftitle/text()"/></xsl:when> 89 <xsl:otherwise><xsl:value-of select="$enum_status" /></xsl:otherwise> 90 </xsl:choose></xsl:attribute> 91 <xsl:attribute name="version"><xsl:choose> 92 <xsl:when test="detaileddescription/para/xrefsect/xrefdescription/para/text() != ''"><xsl:value-of select="detaileddescription/para/xrefsect/xrefdescription/para/text()"/></xsl:when> 93 <xsl:otherwise><xsl:value-of select="$enum_version" /></xsl:otherwise> 94 </xsl:choose></xsl:attribute> 95 <xsl:attribute name="prototype">enum <xsl:value-of select="$enum_node_name"/>::<xsl:value-of 96 select="name/text()" /></xsl:attribute> 97 <xsl:attribute name="file"><xsl:value-of select="$enum_node_file" /></xsl:attribute> 98 </cppfunc> 99 100 </xsl:for-each> <!-- done with enum member --> 101 102 103 </xsl:for-each> <!-- done with enum --> 104 105 106 </xsl:for-each> 107 </list> 108 </xsl:template> 109</xsl:stylesheet> 110 111 112