StringCheck.xslt 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- DWXMLSource="StringCheckSample.xml" -->
  3. <!DOCTYPE xsl:stylesheet [
  4. <!ENTITY nbsp "&#160;">
  5. <!ENTITY copy "&#169;">
  6. <!ENTITY reg "&#174;">
  7. <!ENTITY trade "&#8482;">
  8. <!ENTITY mdash "&#8212;">
  9. <!ENTITY ldquo "&#8220;">
  10. <!ENTITY rdquo "&#8221;">
  11. <!ENTITY pound "&#163;">
  12. <!ENTITY yen "&#165;">
  13. <!ENTITY euro "&#8364;">
  14. ]>
  15. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  16. <xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
  17. <xsl:template match="/">
  18. <html xmlns="http://www.w3.org/1999/xhtml">
  19. <head>
  20. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  21. <title>
  22. <xsl:value-of select="StringUsages/@ReportTitle"/>
  23. </title>
  24. <style>
  25. body {
  26. background: #F3F3F4;
  27. color: #1E1E1F;
  28. font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  29. padding: 0;
  30. margin: 0;
  31. }
  32. h1 {
  33. padding: 10px 0px 10px 10px;
  34. font-size: 21pt;
  35. background-color: #E2E2E2;
  36. border-bottom: 1px #C1C1C2 solid;
  37. color: #201F20;
  38. margin: 0;
  39. font-weight: normal;
  40. }
  41. h2 {
  42. font-size: 18pt;
  43. font-weight: normal;
  44. padding: 15px 0 5px 0;
  45. margin: 0;
  46. }
  47. h3 {
  48. font-weight: normal;
  49. font-size: 15pt;
  50. margin: 0;
  51. padding: 15px 0 5px 0;
  52. background-color: transparent;
  53. }
  54. /* Color all hyperlinks one color */
  55. a {
  56. color: #1382CE;
  57. }
  58. /* Table styles */
  59. table {
  60. border-spacing: 0 0;
  61. border-collapse: collapse;
  62. font-size: 10pt;
  63. }
  64. table th {
  65. background: #E7E7E8;
  66. text-align: left;
  67. text-decoration: none;
  68. font-weight: normal;
  69. padding: 3px 6px 3px 6px;
  70. border: 1px solid #CBCBCB;
  71. }
  72. table td {
  73. vertical-align: top;
  74. padding: 3px 6px 5px 5px;
  75. margin: 0px;
  76. border: 1px solid #CBCBCB;
  77. background: #F7F7F8;
  78. }
  79. /* Local link is a style for hyperlinks that link to file:/// content, there are lots so color them as 'normal' text until the user mouse overs */
  80. .localLink {
  81. color: #1E1E1F;
  82. background: #EEEEED;
  83. text-decoration: none;
  84. }
  85. .localLink:hover {
  86. color: #1382CE;
  87. background: #FFFF99;
  88. text-decoration: none;
  89. }
  90. .baseCell {
  91. width: 100%;
  92. color: #427A9F;
  93. }
  94. .stringCell {
  95. display: table;
  96. }
  97. .tokenCell {
  98. white-space: nowrap;
  99. }
  100. .occurrence {
  101. padding-left: 40px;
  102. }
  103. .block {
  104. display: table-cell;
  105. }
  106. /* Padding around the content after the h1 */
  107. #content {
  108. padding: 0px 12px 12px 12px;
  109. }
  110. #messages table {
  111. width: 97%;
  112. }
  113. </style>
  114. </head>
  115. <body>
  116. <h1>
  117. <xsl:value-of select="StringUsages/@ReportTitle"/>
  118. </h1>
  119. <div id="content">
  120. <h2>Strings</h2>
  121. <div id="messages">
  122. <table>
  123. <tbody>
  124. <xsl:for-each select="StringUsages/Dictionary">
  125. <tr>
  126. <th class="baseCell"> <div class="stringCell">
  127. <div class="block tokenCell"><strong><xsl:value-of select="@Token"/></strong>: "</div>
  128. <div class="block"><xsl:value-of select="@Text"/>"</div>
  129. </div></th>
  130. </tr>
  131. <xsl:for-each select="Occurence">
  132. <xsl:variable name="hyperlink"><xsl:value-of select="@FullPath" /></xsl:variable>
  133. <tr>
  134. <td class="baseCell occurrence"><a href="{@FullPath}"><xsl:value-of select="@FileName"/>:<xsl:value-of select="@LineNumber"/></a></td>
  135. </tr>
  136. </xsl:for-each>
  137. </xsl:for-each>
  138. </tbody>
  139. </table>
  140. </div>
  141. </div>
  142. </body>
  143. </html>
  144. </xsl:template>
  145. </xsl:stylesheet>