forked from SAP-samples/abap-cheat-sheets
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
16 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,7 @@ | ||
<?sap.transform simple?> | ||
<tt:transform xmlns:tt="http://www.sap.com/transformation-templates"> | ||
<tt:root name="CARRIER_INFO"/> | ||
<tt:template> | ||
<html> | ||
<body> | ||
<h2>Information about Carriers</h2> | ||
<table border="1"> | ||
<tr> | ||
<td><b>ID</b></td> | ||
<td><b>Name</b></td> | ||
<td><b>Currency</b></td> | ||
<td><b>Website</b></td> | ||
</tr> | ||
<tt:loop ref=".CARRIER_INFO"> | ||
<tr><td> | ||
<tt:value ref="$ref.carrid"/> | ||
</td> | ||
<td> | ||
<tt:value ref="$ref.carrname"/> | ||
</td> | ||
<td> | ||
<tt:value ref="$ref.currcode"/> | ||
</td> | ||
<td> | ||
<a><tt:attribute name="href" value-ref="$ref.url" /> | ||
<tt:value ref="$ref.url"/></a> | ||
</td> | ||
</tr> | ||
</tt:loop> | ||
</table> | ||
</body> | ||
</html> | ||
</tt:template> | ||
<?sap.transform simple?><tt:transform xmlns:tt="http://www.sap.com/transformation-templates"><tt:root name="CARRIER_INFO"/><tt:template> | ||
<html><body><h2>Information about Carriers</h2><table border="1"> | ||
<tr><td><b>ID</b></td><td><b>Name</b></td><td><b>Currency</b></td><td><b>Website</b></td></tr> | ||
<tt:loop ref=".CARRIER_INFO"><tr><td><tt:value ref="$ref.carrid"/></td><td><tt:value ref="$ref.carrname"/></td> | ||
<td><tt:value ref="$ref.currcode"/></td><td><a><tt:attribute name="href" value-ref="$ref.url" /><tt:value ref="$ref.url"/></a></td></tr></tt:loop> | ||
</table></body></html></tt:template> | ||
</tt:transform> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,4 @@ | ||
<?sap.transform simple?> | ||
<tt:transform xmlns:tt="http://www.sap.com/transformation-templates"> | ||
<tt:root name="STRING_TABLE"/> | ||
<tt:template> | ||
<html> | ||
<body> | ||
<h2>Content of String Table</h2> | ||
<table border="1"> | ||
<tt:loop ref=".STRING_TABLE"> | ||
<tr><td> | ||
<tt:value ref="$ref"/> | ||
</td> | ||
</tr> | ||
</tt:loop> | ||
</table> | ||
</body> | ||
</html> | ||
</tt:template> | ||
</tt:transform> | ||
<?sap.transform simple?><tt:transform xmlns:tt="http://www.sap.com/transformation-templates"> | ||
<tt:root name="STRING_TABLE"/><tt:template><html><body><h2>Content of String Table</h2><table border="1"> | ||
<tt:loop ref=".STRING_TABLE"><tr><td><tt:value ref="$ref"/></td></tr></tt:loop></table> | ||
</body></html></tt:template></tt:transform> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,6 @@ | ||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | ||
<xsl:strip-space elements="*"/> | ||
|
||
<xsl:template match="node()|@*"> | ||
<xsl:copy> | ||
<xsl:apply-templates select="node()|@*"/> | ||
</xsl:copy> | ||
</xsl:template> | ||
|
||
<xsl:template match="*[MAXSEATS and OCCSEATS]"> | ||
<xsl:copy> | ||
<xsl:apply-templates select="node()|@*"/> | ||
<FREESEATS> | ||
<xsl:value-of select="MAXSEATS - OCCSEATS"/> | ||
</FREESEATS> | ||
<OCCUPANCYRATE> | ||
<xsl:value-of select="format-number(OCCSEATS div MAXSEATS * 100, '##.##')"/> | ||
</OCCUPANCYRATE> | ||
</xsl:copy> | ||
</xsl:template> | ||
</xsl:stylesheet> | ||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:strip-space elements="*"/> | ||
<xsl:template match="node()|@*"><xsl:copy><xsl:apply-templates select="node()|@*"/></xsl:copy></xsl:template> | ||
<xsl:template match="*[MAXSEATS and OCCSEATS]"><xsl:copy><xsl:apply-templates select="node()|@*"/> | ||
<FREESEATS><xsl:value-of select="MAXSEATS - OCCSEATS"/></FREESEATS> | ||
<OCCUPANCYRATE><xsl:value-of select="format-number(OCCSEATS div MAXSEATS * 100, '##.##')"/></OCCUPANCYRATE> | ||
</xsl:copy></xsl:template></xsl:stylesheet> |