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) 2016 and later: Unicode, Inc. and others. 9* License & terms of use: http://www.unicode.org/copyright.html 10* Copyright (C) 2008-2013, International Business Machines Corporation and * 11* others. All Rights Reserved. * 12******************************************************************************* 13* This is the XSLT for the API Report. 14*/ 15--> 16<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 17 <xsl:param name="leftVer" /> 18 <xsl:param name="rightVer" /> 19 <xsl:param name="dateTime" /> 20 <xsl:param name="rightMilestone" /> 21 <xsl:param name="leftMilestone" /> 22 <xsl:param name="notFound" /> 23 <!-- <xsl:param name="ourYear" /> --> 24 25 <xsl:output method="html" version="4.0" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" 26doctype-system="http://www.w3.org/TR/html4/loose.dtd" 27 omit-xml-declaration="yes" encoding="utf-8" indent="yes"/> 28 29 30 <xsl:template match="/"> 31 <html> 32 <xsl:comment> 33 Copyright © 2016 and later: Unicode, Inc. and others. 34 License & terms of use: http://www.unicode.org/copyright.html 35 </xsl:comment> 36 <head> 37 <title>ICU4C API Comparison: <xsl:value-of select="$leftVer"/><xsl:value-of select="$leftMilestone" /> with <xsl:value-of select="$rightVer" /><xsl:value-of select="$rightMilestone" /> </title> 38 <link rel="stylesheet" href="icu4c.css" type="text/css" /> 39 </head> 40 41 <body> 42 43 <a name="#_top"></a> 44 45 <h1>ICU4C API Comparison: <xsl:value-of select="$leftVer"/><xsl:value-of select="$leftMilestone" /> with <xsl:value-of select="$rightVer" /><xsl:value-of select="$rightMilestone" /> </h1> 46 47 <div id="toc"> 48 <ul> 49 <li><a href="#removed">Removed from <xsl:value-of select="$leftVer"/></a></li> 50 <li><a href="#deprecated">Deprecated or Obsoleted in <xsl:value-of select="$rightVer" /></a></li> 51 <li><a href="#changed">Changed in <xsl:value-of select="$rightVer" /></a></li> 52 <li><a href="#promoted">Promoted to stable in <xsl:value-of select="$rightVer" /></a></li> 53 <li><a href="#added">Added in <xsl:value-of select="$rightVer" /></a></li> 54 <li><a href="#other">Other existing drafts in <xsl:value-of select="$rightVer" /></a></li> 55 <li><a href="#simplifications">Signature Simplifications</a></li> 56 </ul> 57 <hr /> 58 </div> 59 60 <a name="removed"></a> 61 <h2>Removed from <xsl:value-of select="$leftVer"/> </h2> 62 <xsl:call-template name="genTable"> 63 <xsl:with-param name="nodes" select="/list/func[@rightStatus=$notFound]"/> 64 </xsl:call-template> 65 <P/><a href="#_top">(jump back to top)</a><hr/> 66 67 <a name="deprecated"></a> 68 <h2>Deprecated or Obsoleted in <xsl:value-of select="$rightVer" /></h2> 69 <xsl:call-template name="genTable"> 70 <xsl:with-param name="nodes" select="/list/func[(@rightStatus='Deprecated' and @leftStatus!='Deprecated') or (@rightStatus='Obsolete' and @leftStatus!='Obsolete')]"/> 71 </xsl:call-template> 72 <P/><a href="#_top">(jump back to top)</a><hr/> 73 74 <a name="changed"></a> 75 <h2>Changed in <xsl:value-of select="$rightVer" /> (old, new)</h2> 76 <xsl:call-template name="genTable"> 77 <xsl:with-param name="nodes" select="/list/func[(@leftStatus != $notFound) and (@rightStatus != $notFound) and ( (@leftStatus != @rightStatus) or (@leftVersion != @rightVersion) ) and not ( (@leftStatus = 'Draft') and (@rightStatus = 'Stable') and (@rightVersion = $rightVer) )]"/> 78 </xsl:call-template> 79 <P/><a href="#_top">(jump back to top)</a><hr/> 80 81 <a name="promoted"></a> 82 <h2>Promoted to stable in <xsl:value-of select="$rightVer" /></h2> 83 <xsl:call-template name="genTable"> 84 <xsl:with-param name="nodes" select="/list/func[@leftStatus != 'Stable' and @rightStatus = 'Stable']"/> 85 </xsl:call-template> 86 <P/><a href="#_top">(jump back to top)</a><hr/> 87 88 <a name="added"></a> 89 <h2>Added in <xsl:value-of select="$rightVer" /></h2> 90 <xsl:call-template name="genTable"> 91 <xsl:with-param name="nodes" select="/list/func[@leftStatus=$notFound]"/> 92 </xsl:call-template> 93 <P/><a href="#_top">(jump back to top)</a><hr/> 94 95 <a name="other"></a> 96 <h2>Other existing drafts in <xsl:value-of select="$rightVer" /></h2> 97 <div class='other'> 98 <xsl:call-template name="infoTable"> <!-- note: note genTable --> 99 <xsl:with-param name="nodes" select="/list/func[@rightStatus = 'Draft' and @rightVersion != $rightVer]"/> 100 </xsl:call-template> 101 </div> 102 <P/><a href="#_top">(jump back to top)</a><hr/> 103 104 <a name="simplifications"></a> 105 <h2>Signature Simplifications</h2> 106 <i>This section shows cases where the signature was "simplified" for the sake of comparison. The simplified form is in bold, followed by 107 all possible variations in "original" form.</i> 108 <div class='other'> 109 <ul> 110 <xsl:for-each select="/list/simplifications/simplification"> 111 <li><b><xsl:value-of select="base" /></b> 112 <br /> 113 <xsl:for-each select="change"> 114 <xsl:value-of select="text()" /><br /> 115 </xsl:for-each> 116 </li> 117 </xsl:for-each> 118 </ul> 119 </div> 120 <P/><a href="#_top">(jump back to top)</a><hr/> 121<!-- 122 123--> 124 125 <p><i><font size="-1">Contents generated by StableAPI tool on <xsl:value-of select="$dateTime" /><br/> 126 Copyright © 2017 and later: Unicode, Inc. and others.<br/> 127 License & terms of use: http://www.unicode.org/copyright.html 128 </font></i></p> 129 </body> 130 </html> 131 </xsl:template> 132 133 <!-- almost all sutables are generated by this --> 134 <xsl:template name="genTable"> 135 <xsl:param name="nodes" /> 136 <table class='genTable' BORDER="1"> 137 <THEAD> 138 <tr> 139 <th> <xsl:value-of select="'File'" /> </th> 140 <th> <xsl:value-of select="'API'" /> </th> 141 <th> <xsl:value-of select="$leftVer" /> </th> 142 <th> <xsl:value-of select="$rightVer" /> </th> 143 </tr> 144 </THEAD> 145 146 <xsl:for-each select="$nodes"> 147 <xsl:sort select="@file" /> 148<!-- 149 <xsl:comment> 150 @prototype: <xsl:value-of select="@prototype" /> 151 @leftStatus: <xsl:value-of select="@leftStatus" /> 152 @leftVersion: <xsl:value-of select="@leftVersion" /> 153 @rightStatus: <xsl:value-of select="@rightStatus" /> 154 @rightVersion: <xsl:value-of select="@rightVersion" /> 155 </xsl:comment> 156--> 157 <tr> 158 <xsl:attribute name="class"> 159 <xsl:value-of select="'row'"/> 160 <xsl:value-of select="(position() mod 2)"/> <!-- for even-odd row colorings --> 161 <!-- 162 <xsl:choose> 163 <xsl:when test="(position() mod 2) = 0"><xsl:value-of select="row0" /></xsl:when> 164 <xsl:otherwise><xsl:value-of select="row1" /></xsl:otherwise> 165 </xsl:choose> 166 --> 167 </xsl:attribute> 168 <td class='file'> <xsl:value-of select="@file" /> </td> 169 <td class='proto'> <xsl:value-of disable-output-escaping="yes" select="@prototype" /> </td> 170 <td> 171 <xsl:attribute name="class"> 172 <xsl:if test ="@leftStatus = 'Stable'"> 173 <xsl:value-of select="'stabchange'" /> 174 </xsl:if> 175 </xsl:attribute> 176 <xsl:if test = "@leftStatus = 'Draft' and @rightStatus = 'Stable' and @leftVersion = @rightVersion"> 177 <xsl:attribute name="colspan">2</xsl:attribute> 178 <xsl:attribute name="align">center</xsl:attribute> 179 </xsl:if> 180 181 <xsl:value-of select="@leftStatus" /> 182 <xsl:if test = "@leftStatus = 'Draft' and @rightStatus = 'Stable' and @leftVersion = @rightVersion">→Stable</xsl:if> 183 <xsl:if test="@leftVersion != '' and @leftVersion != '.'"> 184 <br/> 185 <xsl:value-of select="@leftVersion" /> 186 </xsl:if> 187 <xsl:if test="@leftStatus = '' and @leftVersion = ''"> 188 <i>(untagged)</i> 189 </xsl:if> 190 </td> 191 <xsl:if test = "@leftStatus != 'Draft' or @rightStatus != 'Stable' or @leftVersion != @rightVersion"> 192 <td> <xsl:value-of select="@rightStatus" /> 193 <br/> 194 <span> 195 <xsl:attribute name="class"> 196 <xsl:if test ="@leftVersion != @rightVersion and @leftVersion != '' and @rightVersion != '' and @rightVersion != '.'"> 197 <xsl:value-of select="'verchange'" /> 198 </xsl:if> 199 </xsl:attribute> 200 <xsl:if test="@rightVersion != '.'"> 201 <span> 202 <xsl:value-of select="@rightVersion" /> 203 </span> 204 </xsl:if> 205 <xsl:if test ="@leftVersion != @rightVersion and @leftVersion != '' and @rightVersion != '' and @rightStatus = 'Stable' and not ( (@leftStatus = 'Draft') and (@rightStatus = 'Stable') and (@rightVersion = $rightVer) )"> 206 <br/><b title='A stable API changed version.' class='bigwarn'>(changed)</b> 207 </xsl:if> 208 <xsl:if test ="@rightStatus = 'Draft' and @rightVersion != $rightVer"> 209 <br/><b title='A draft API has the wrong version.' class='bigwarn'>(should be <xsl:value-of select="$rightVer"/>)</b> 210 </xsl:if> 211 <xsl:if test="@leftStatus = $notFound and @rightVersion = '' and @rightStatus != 'Internal' and @rightStatus != 'Deprecated'"> 212 <br/><b title='A new API was introduced that was not tagged.' class='bigwarn'>(untagged)</b> 213 </xsl:if> 214 </span> 215 </td> 216 </xsl:if> 217 <xsl:if test = "@rightStatus = 'Stable' and @rightVersion = $rightVer"> 218 <td class='bornstable'> 219 <b class='bigwarn'><xsl:attribute name="title">A new API was introduced as stable in <xsl:value-of select='$rightVer'/>.</xsl:attribute>(Born Stable)</b> 220 </td> 221 </xsl:if> 222 </tr> 223 </xsl:for-each> 224 </table> 225 </xsl:template> 226 227 <xsl:template name="infoTable"> 228 <xsl:param name="nodes" /> 229 <table class='genTable' BORDER="1"> 230 <THEAD> 231 <tr> 232 <th> <xsl:value-of select="'File'" /> </th> 233 <th> <xsl:value-of select="'API'" /> </th> 234 <th> <xsl:value-of select="$leftVer" /> </th> 235 <th> <xsl:value-of select="$rightVer" /> </th> 236 </tr> 237 </THEAD> 238 239 <xsl:for-each select="$nodes"> 240 <xsl:sort select="@file" /> 241 242 <tr> 243 <xsl:attribute name="class"> 244 <xsl:value-of select="'row'"/> 245 <xsl:value-of select="(position() mod 2)"/> 246 <!-- 247 <xsl:choose> 248 <xsl:when test="(position() mod 2) = 0"><xsl:value-of select="row0" /></xsl:when> 249 <xsl:otherwise><xsl:value-of select="row1" /></xsl:otherwise> 250 </xsl:choose> 251 --> 252 </xsl:attribute> 253 <td class='file'> <xsl:value-of select="@file" /> </td> 254 <td class='proto'> <xsl:value-of disable-output-escaping="yes" select="@prototype" /> </td> 255 <td> 256 <xsl:attribute name="class"> 257 <xsl:if test ="@leftStatus = 'Stable'"> 258 <xsl:value-of select="'stabchange'" /> 259 </xsl:if> 260 </xsl:attribute> 261 262 <xsl:if test = "@leftStatus = @rightStatus and @leftVersion = @rightVersion"> 263 <xsl:attribute name="colspan">2</xsl:attribute> 264 <xsl:attribute name="align">center</xsl:attribute> 265 </xsl:if> 266 267 <xsl:value-of select="@leftStatus" /> 268 <br/> <xsl:value-of select="@leftVersion" /> 269 </td> 270 <xsl:if test = "@leftStatus != @rightStatus or @leftVersion != @rightVersion"> 271 <td> <xsl:value-of select="@rightStatus" /> 272 <br/> 273 <span> 274 <xsl:attribute name="class"> 275 <xsl:if test ="@leftVersion != @rightVersion and @leftVersion != '' and @rightVersion != '' and @rightVersion != '.'"> 276 <xsl:value-of select="'verchange'" /> 277 </xsl:if> 278 </xsl:attribute> 279 <span> 280 <xsl:if test = "@rightVersion != '.'"> 281 <xsl:value-of select="@rightVersion" /> 282 </xsl:if> 283 </span> 284 <!-- 285 <xsl:if test ="@leftVersion != @rightVersion and @leftVersion != '' and @rightVersion != '' and @rightStatus = 'Stable'"> 286 <br/><b title='A stable API changed version.' class='bigwarn'>(changed)</b> 287 </xsl:if> 288 <xsl:if test ="@rightStatus = 'Draft' and @rightVersion != $rightVer"> 289 <br/><b title='A draft API has the wrong version.' class='bigwarn'>(should be <xsl:value-of select="$rightVer"/>)</b> 290 </xsl:if> 291 <xsl:if test="@leftStatus = $notFound and @rightVersion = ''"> 292 <br/><b title='A new API was introduced that was not tagged.' class='bigwarn'>(untagged)</b> 293 </xsl:if> 294 --> 295 </span> 296 </td> 297 </xsl:if> 298 </tr> 299 </xsl:for-each> 300 </table> 301 </xsl:template> 302 303 304 <xsl:template name="pureVirtualTable"> 305 <xsl:param name="nodes" /> 306 <table class='genTable' BORDER="1"> 307 <!-- 308 <THEAD> 309 <tr> 310 <th> <xsl:value-of select="'File'" /> </th> 311 <th> <xsl:value-of select="'API'" /> </th> 312 <th> <xsl:value-of select="$leftVer" /> </th> 313 <th> <xsl:value-of select="$rightVer" /> </th> 314 </tr> 315 </THEAD> 316 --> 317 318 <xsl:for-each select="$nodes"> 319 <xsl:sort select="@file" /> 320 321 <tr> 322 <xsl:attribute name="class"> 323 <xsl:value-of select="'row'"/> 324 <xsl:value-of select="(position() mod 2)"/> 325 <!-- 326 <xsl:choose> 327 <xsl:when test="(position() mod 2) = 0"><xsl:value-of select="row0" /></xsl:when> 328 <xsl:otherwise><xsl:value-of select="row1" /></xsl:otherwise> 329 </xsl:choose> 330 --> 331 </xsl:attribute> 332 <td class='file'> <xsl:value-of select="@file" /> </td> 333 <td class='proto'> <xsl:value-of disable-output-escaping="yes" select="@prototype" /> </td> 334 <td> 335 <xsl:attribute name="class"> 336 <xsl:if test ="@leftStatus = 'Stable'"> 337 <xsl:value-of select="'stabchange'" /> 338 </xsl:if> 339 </xsl:attribute> 340 341 <xsl:if test = "@leftStatus = @rightStatus and @leftVersion = @rightVersion"> 342 <xsl:attribute name="colspan">2</xsl:attribute> 343 <xsl:attribute name="align">center</xsl:attribute> 344 </xsl:if> 345 346 <xsl:value-of select="@leftStatus" /> 347 <br/> <xsl:value-of select="@leftVersion" /> 348 </td> 349 <xsl:if test = "@leftStatus != @rightStatus or @leftVersion != @rightVersion"> 350 <td> <xsl:value-of select="@rightStatus" /> 351 <br/> 352 <span> 353 <xsl:attribute name="class"> 354 <xsl:if test ="@leftVersion != @rightVersion and @leftVersion != '' and @rightVersion != ''"> 355 <xsl:value-of select="'verchange'" /> 356 </xsl:if> 357 </xsl:attribute> 358 <span> 359 <xsl:value-of select="@rightVersion" /> 360 </span> 361 <!-- 362 <xsl:if test ="@leftVersion != @rightVersion and @leftVersion != '' and @rightVersion != '' and @rightStatus = 'Stable'"> 363 <br/><b title='A stable API changed version.' class='bigwarn'>(changed)</b> 364 </xsl:if> 365 <xsl:if test ="@rightStatus = 'Draft' and @rightVersion != $rightVer"> 366 <br/><b title='A draft API has the wrong version.' class='bigwarn'>(should be <xsl:value-of select="$rightVer"/>)</b> 367 </xsl:if> 368 <xsl:if test="@leftStatus = $notFound and @rightVersion = ''"> 369 <br/><b title='A new API was introduced that was not tagged.' class='bigwarn'>(untagged)</b> 370 </xsl:if> 371 --> 372 </span> 373 </td> 374 </xsl:if> 375 </tr> 376 </xsl:for-each> 377 </table> 378 </xsl:template> 379 380</xsl:stylesheet> 381