Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ab="http://www.sap.com/abapdemos" exclude-result-prefixes="ab" version="2.0">
- <xsl:output doctype-public="XSLT-compat" encoding="UTF-8" indent="yes" method="html" omit-xml-declaration="yes"/>
- <!-- See discussion in the comment to Horst Keller's blogpost on class CL_DEMO_OUTPUT
- https://blogs.sap.com/2021/12/08/cl_demo_output-invigorated/comment-page-1/#comment-679898
- -->
- <xsl:template match="ab:abapOutput">
- <html>
- <head>
- <meta content="Data" name="Output"/>
- <style type="text/css">
- body { font-family: Arial; font-size: 90%; }
- table { font-family: Arial; font-size: 90%; }
- caption { font-family: Arial; font-size: 90%; font-weight:bold; text-align:left; }
- span.heading1 {font-size: 150%; color:#000080; font-weight:bold;}
- span.heading2 {font-size: 135%; color:#000080; font-weight:bold;}
- span.heading3 {font-size: 120%; color:#000080; font-weight:bold;}
- span.heading4 {font-size: 105%; color:#000080; font-weight:bold;}
- span.normal {font-size: 100%; color:#000000; font-weight:normal;}
- span.nonprop {font-family: Courier New; font-size: 100%; color:#000000; font-weight:400;}
- span.nowrap {white-space:nowrap; }
- span.nprpnwrp {font-family: Courier New; font-size: 100%; color:#000000; font-weight:400; white-space:nowrap; }
- tr.header {background-color:#D3D3D3; }
- tr.body {background-color:#EFEFEF; }
- tr.body > td {white-space:nowrap}
- table.nested_table, .nested_table td { border: 1px solid; border-collapse: collapse; padding: 4px; text-align:center; }
- .nested_table th { border: 1px solid; border-collapse: collapse; background-color: #FFFFE0; padding: 4px; }
- </style>
- </head>
- <xsl:apply-templates/>
- </html>
- </xsl:template>
- <xsl:template match="ab:nested[ab:name = 'Table' or ab:name = 'Structure']">
- <table class="nested_table">
- <xsl:apply-templates/>
- </table>
- </xsl:template>
- <xsl:template match="ab:name[.='Table' or .='Structure']">
- </xsl:template>
- <xsl:template match="ab:name">
- <caption><span class="nowrap">
- <xsl:value-of select="."/>
- </span></caption>
- </xsl:template>
- <xsl:template match="ab:output">
- <body>
- <xsl:apply-templates/>
- </body>
- </xsl:template>
- <xsl:template match="ab:object">
- <table border="0" summary="data display" title="ABAP Data">
- <xsl:apply-templates/>
- </table>
- </xsl:template>
- <xsl:template match="ab:text">
- <p>
- <xsl:apply-templates/>
- </p>
- </xsl:template>
- <xsl:template match="ab:components">
- <tr>
- <xsl:apply-templates/>
- </tr>
- </xsl:template>
- <xsl:template match="ab:compName">
- <th>
- <xsl:apply-templates/>
- </th>
- </xsl:template>
- <xsl:template match="ab:data">
- <xsl:apply-templates/>
- </xsl:template>
- <xsl:template match="ab:row">
- <tr class="body">
- <xsl:apply-templates/>
- </tr>
- </xsl:template>
- <xsl:template match="ab:compValue">
- <td>
- <xsl:apply-templates/>
- </td>
- </xsl:template>
- </xsl:transform>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement