Changeset 99726 in vbox for trunk/src/VBox/Main/idl
- Timestamp:
- May 10, 2023 2:35:53 PM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/doxygen.xsl
r98103 r99726 40 40 <xsl:import href="string.xsl"/> 41 41 42 <xsl:output method="html" indent="yes"/> 42 <!-- Don't indent the output, as it's not exactly html but IDL. 43 (doxygen 1.9.6 gets confused by <dl> indent.) --> 44 <xsl:output method="html" indent="no"/> 43 45 44 46 <xsl:strip-space elements="*"/> … … 57 59 <xsl:value-of select="concat(' ',normalize-space(.),' ')"/> 58 60 </xsl:template--> 61 62 <!-- 63 Replace /* and */ sequences in the text so they won't confuse doxygen with 64 comment nesting (see IPerformanceCollector). Doxygen doesn't have any escape 65 sequence for '/' nor for '*', and xsltproc is in html mode so we cannot easily 66 output dummy elements. So, we replace the '*' with '@SLASH-ASTERISK@' and 67 '@ASTERISK-SLASH@' and run sed afterwards to change them to sequences with 68 a dummy 'b' element in-between the characters (* does not work). 69 70 TODO: Find better fix for this. 71 72 ~~Also, strip leading whitespace from the first child of a 'desc' element so 73 that doxygen 1.9.6 doesn't confuse the text for a tt or pre block (older 74 versions (1.8.13) didn't used to do this).~~ - fixed by MARKDOWN_SUPPORT=NO. 75 --> 76 <xsl:template match="desc//text()" name="default-text-processing"> 77 <xsl:param name="text" select="."/> 78 79 <!-- xsl:variable name="stripped"> 80 <xsl:choose> 81 <xsl:when test="parent::desc and position() = 1"> 82 <xsl:call-template name="strip-left"> 83 <xsl:with-param name="text" select="$text"/> 84 </xsl:call-template> 85 </xsl:when> 86 <xsl:otherwise> 87 <xsl:value-of select="$text"/> 88 </xsl:otherwise> 89 </xsl:choose> 90 </xsl:variable --> 91 92 <xsl:variable name="subst1"> 93 <xsl:call-template name="str:subst"> 94 <!-- xsl:with-param name="text" select="$stripped" / --> 95 <xsl:with-param name="text" select="$text" /> 96 <xsl:with-param name="replace" select="'/*'" /> 97 <xsl:with-param name="with" select="'/@SLASH-ASTERISK@'"/> 98 </xsl:call-template> 99 </xsl:variable> 100 <xsl:variable name="subst2"> 101 <xsl:call-template name="str:subst"> 102 <xsl:with-param name="text" select="$subst1" /> 103 <xsl:with-param name="replace" select="'*/'" /> 104 <xsl:with-param name="with" select="'@ASTERISK-SLASH@/'" /> 105 </xsl:call-template> 106 </xsl:variable> 107 108 <!-- xsl:value-of select="concat('-dbg-',position(),'-gbd-')"/ --> 109 <xsl:value-of select="$subst2"/> 110 </xsl:template> 111 112 <!-- Strips leading spaces from $text. Helper for default-text-processing. --> 113 <xsl:template name="strip-left"> 114 <xsl:param name="text"/> 115 <xsl:choose> 116 <xsl:when test="string-length($text) > 0 and (substring($text, 1, 1) = ' ' or substring($text, 1, 1) = '
' or substring($text, 1, 1) = '
')"> 117 <xsl:call-template name="strip-left"> 118 <xsl:with-param name="text" select="substring($text, 2)"/> 119 </xsl:call-template> 120 </xsl:when> 121 122 <xsl:otherwise> 123 <xsl:value-of select="$text"/> 124 </xsl:otherwise> 125 </xsl:choose> 126 </xsl:template> 127 59 128 60 129 <!-- … … 80 149 </xsl:call-template> 81 150 </xsl:variable> 82 <xsl:value-of select="$subst1"/> 151 <xsl:call-template name="default-text-processing"> 152 <xsl:with-param name="text" select="$subst1"/> 153 </xsl:call-template> 83 154 </xsl:template> 84 155 … … 220 291 <xsl:value-of select="concat(' @ingroup ',$id,'
')"/> 221 292 </xsl:if> 222 <xsl:text> @brief 
</xsl:text>293 <xsl:text> @brief </xsl:text> 223 294 </xsl:template> 224 295 … … 401 472 <xsl:for-each select="//descGroup"> 402 473 <xsl:if test="@id and (@title or desc)"> 403 <xsl:value-of select="concat('/** @defgroup ', @id,' ',@title)"/>474 <xsl:value-of select="concat('/** @defgroup ', @id, ' ', @title, '
')"/> 404 475 <xsl:apply-templates select="desc" mode="middle"/> 405 476 <xsl:text>
*/
</xsl:text>
Note:
See TracChangeset
for help on using the changeset viewer.