-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #469 from lankavitharana/addXsltParamSupport
Add parameter passing support for xslt transformations
- Loading branch information
Showing
7 changed files
with
108 additions
and
6 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
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
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
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
27 changes: 27 additions & 0 deletions
27
ballerina/tests/resources/datafiles/cd_catalog_with_params.xsl
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | ||
<xsl:param name="param1"></xsl:param> | ||
<xsl:param name="param2"></xsl:param> | ||
<xsl:template match="/"> | ||
<html> | ||
<body> | ||
<h2>My CD Collection</h2> | ||
<h3> | ||
<xsl:value-of select="$param1"/> | ||
</h3> | ||
<h4>My Rating - <xsl:value-of select="$param2"/></h4> | ||
<table border="1"> | ||
<tr bgcolor="#9acd32"> | ||
<th style="text-align:left">Title</th> | ||
<th style="text-align:left">Artist</th> | ||
</tr> | ||
<xsl:for-each select="catalog/cd"> | ||
<tr> | ||
<td><xsl:value-of select="title"/></td> | ||
<td><xsl:value-of select="artist"/></td> | ||
</tr> | ||
</xsl:for-each> | ||
</table> | ||
</body> | ||
</html> | ||
</xsl:template> | ||
</xsl:stylesheet> |
29 changes: 29 additions & 0 deletions
29
ballerina/tests/resources/datafiles/read_from_file_with_params_result.xml
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<html> | ||
<body> | ||
<h2>My CD Collection</h2> | ||
<h3>Music CD Collection With Artist</h3> | ||
<h4>My Rating - 5</h4> | ||
<table border="1"> | ||
<tr bgcolor="#9acd32"> | ||
<th style="text-align:left">Title</th> | ||
<th style="text-align:left">Artist</th> | ||
</tr> | ||
<tr> | ||
<td>Empire Burlesque</td> | ||
<td>Bob Dylan</td> | ||
</tr> | ||
<tr> | ||
<td>Hide your heart</td> | ||
<td>Bonnie Tyler</td> | ||
</tr> | ||
<tr> | ||
<td>Greatest Hits</td> | ||
<td>Dolly Parton</td> | ||
</tr> | ||
<tr> | ||
<td>Still got the blues</td> | ||
<td>Gary Moore</td> | ||
</tr> | ||
</table> | ||
</body> | ||
</html> |
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