/esp/xslt/flagship_notification_rollupbusinessrpt.xslt

http://github.com/hpcc-systems/HPCC-Platform · Extensible Stylesheet Language Transformations · 176 lines · 158 code · 18 blank · 0 comment · 0 complexity · 552111c2800b576eb016151bfa98fb87 MD5 · raw file

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ##############################################################################
  4. # HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.
  5. #
  6. # Licensed under the Apache License, Version 2.0 (the "License");
  7. # you may not use this file except in compliance with the License.
  8. # You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. ##############################################################################
  18. -->
  19. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  20. <!--xsl:output method="html"/>
  21. <xsl:template match="/NotificationQueryResponse">
  22. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  23. <head>
  24. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  25. <title>Notification</title>
  26. <script language="JavaScript1.2">
  27. var currentDate = '';
  28. function onLoad()
  29. {
  30. currentDate = Date();
  31. return;
  32. }
  33. </script>
  34. </head>
  35. <body bgcolor="#e6e7de" onload="onLoad()">
  36. <div align="center" class="unifont1">
  37. <script language = "JavaScript">
  38. var now = new Date();
  39. var timestring = now.toLocaleString();
  40. var startpos = timestring.indexOf(" ");
  41. document.write("Saved Search Update Report: " + timestring.substr(startpos + 1));
  42. </script>
  43. </div>
  44. <br/>
  45. <div align="left" class="unifont1">
  46. <blockquote>
  47. <xsl:text>You've received this alert because you have subscribed for </xsl:text><b><xsl:value-of select="Subscription/ServiceName"/></b><xsl:text> alert:</xsl:text><br/>
  48. <br/>
  49. <blockquote>
  50. <xsl:apply-templates select="Subscription"/>
  51. <xsl:apply-templates select="Notification"/>
  52. </blockquote>
  53. <xsl:apply-templates select="Content"/>
  54. </blockquote>
  55. </div>
  56. </body>
  57. </html>
  58. </xsl:template-->
  59. <xsl:output method="text" encoding='iso-8859-1'/>
  60. <xsl:template match="/NotificationQueryResponse">
  61. <xsl:text>
  62. </xsl:text>
  63. <xsl:text>LexisNexis&#174;
  64. </xsl:text>
  65. <xsl:apply-templates select="Subscription"/>
  66. <xsl:apply-templates select="Notification"/>
  67. <xsl:apply-templates select="Content"/>
  68. </xsl:template>
  69. <xsl:template match="Subscription">
  70. <xsl:if test="string-length(SubscriptionCreated) > 0">
  71. <xsl:value-of select="SubscriptionCreated"/><xsl:text> (GMT)
  72. </xsl:text>
  73. </xsl:if>
  74. <xsl:text>-----------------------------------------------------------------------------------
  75. </xsl:text>
  76. <xsl:text>Rollup Business Report Email Alert
  77. </xsl:text>
  78. <xsl:if test="string-length(SubscriberID) > 0">
  79. <xsl:text> Subscriber: </xsl:text><xsl:value-of select="SubscriberID"/>
  80. <xsl:text>
  81. </xsl:text>
  82. </xsl:if>
  83. <xsl:text> Subscription: </xsl:text><b><xsl:value-of select="SubscriptionName"/></b><br/>
  84. <xsl:text>
  85. </xsl:text>
  86. <xsl:if test="string-length(Note) > 0">
  87. <xsl:text> Note: </xsl:text><xsl:value-of select="Note"/>
  88. <xsl:text>
  89. </xsl:text>
  90. </xsl:if>
  91. <xsl:if test="string-length(SearchRequest/SearchBy/BusinessId) > 0">
  92. <xsl:text> Business Id: </xsl:text><b><xsl:value-of select="SearchRequest/SearchBy/BusinessId"/><xsl:text>; </xsl:text></b><br/>
  93. <xsl:text>
  94. </xsl:text>
  95. </xsl:if>
  96. </xsl:template>
  97. <xsl:template match="Notification">
  98. <xsl:text> Date Created: </xsl:text><b><xsl:value-of select="DateCreated"/><xsl:text> (GMT)</xsl:text></b>
  99. <xsl:text>
  100. </xsl:text>
  101. <xsl:text>
  102. </xsl:text>
  103. </xsl:template>
  104. <xsl:template match="Content">
  105. <xsl:text>**************************************************************************
  106. </xsl:text>
  107. <xsl:text> Report For: </xsl:text><b><xsl:value-of select="ReportFor/CompanyName"/></b><br/>
  108. <xsl:text>
  109. </xsl:text>
  110. <xsl:text> Address: </xsl:text><b><xsl:value-of select="ReportFor/Address/StreetNumber"/><xsl:text> </xsl:text><xsl:value-of select="ReportFor/Address/StreetPrefix"/><xsl:text> </xsl:text><xsl:value-of select="ReportFor/Address/StreetName"/><xsl:text> </xsl:text><xsl:value-of select="ReportFor/Address/StreetSuffix"/><xsl:text>, </xsl:text><xsl:value-of select="ReportFor/Address/City"/><xsl:text>, </xsl:text><xsl:value-of select="ReportFor/Address/State"/><xsl:text> </xsl:text><xsl:value-of select="ReportFor/Address/Zip5"/><xsl:text>-</xsl:text><xsl:value-of select="ReportFor/Address/Zip4"/></b><br/><br/>
  111. <xsl:text>
  112. </xsl:text>
  113. <xsl:text> Name Variations: </xsl:text>
  114. <xsl:text>
  115. </xsl:text>
  116. <xsl:apply-templates select="NameVariations"/>
  117. <xsl:text> Phone Variations: </xsl:text>
  118. <xsl:text>
  119. </xsl:text>
  120. <xsl:apply-templates select="PhoneVariations"/>
  121. <xsl:text> Address Variations: </xsl:text>
  122. <xsl:text>
  123. </xsl:text>
  124. <xsl:apply-templates select="AddressVariations"/>
  125. <xsl:text>
  126. </xsl:text>
  127. <xsl:text>-----------------------------------------------------------------------------------</xsl:text>
  128. </xsl:template>
  129. <xsl:template match="NameVariations">
  130. <xsl:apply-templates select="CompanyName"/>
  131. </xsl:template>
  132. <xsl:template match="CompanyName">
  133. <xsl:text> Company Name: </xsl:text><b><xsl:value-of select="."/></b><br/>
  134. <xsl:text>
  135. </xsl:text>
  136. </xsl:template>
  137. <xsl:template match="PhoneVariations">
  138. <xsl:apply-templates select="PhoneInfo"/>
  139. </xsl:template>
  140. <xsl:template match="PhoneInfo">
  141. <xsl:text> Phone Number: </xsl:text><b><xsl:value-of select="Phone10"/></b><br/>
  142. <xsl:text>
  143. </xsl:text>
  144. </xsl:template>
  145. <xsl:template match="AddressVariations">
  146. <xsl:apply-templates select="AddressInfo"/>
  147. </xsl:template>
  148. <xsl:template match="AddressInfo">
  149. <xsl:text> Address: </xsl:text><b><xsl:value-of select="Address/StreetNumber"/><xsl:text> </xsl:text><xsl:value-of select="Address/StreetPrefix"/><xsl:text> </xsl:text><xsl:value-of select="Address/StreetName"/><xsl:text> </xsl:text><xsl:value-of select="Address/StreetSuffix"/><xsl:text>, </xsl:text><xsl:value-of select="Address/City"/><xsl:text>, </xsl:text><xsl:value-of select="Address/State"/><xsl:text> </xsl:text><xsl:value-of select="Address/Zip5"/></b>
  150. <xsl:text>
  151. </xsl:text>
  152. <xsl:if test="string-length(Address/Zip4) > 0">
  153. <xsl:text>-</xsl:text><xsl:value-of select="Address/Zip4"/>
  154. <xsl:text>
  155. </xsl:text>
  156. </xsl:if>
  157. </xsl:template>
  158. </xsl:stylesheet>