Last active
August 29, 2015 14:14
-
-
Save hbi99/e714247a0329e29fbbb5 to your computer and use it in GitHub Desktop.
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
<!-- Defiant template --> | |
<script type="defiant/xsl-template"> | |
<xsl:template name="books_template"> | |
<xsl:for-each select="//movie"> | |
<xsl:value-of select="title"/><br/> | |
</xsl:for-each> | |
</xsl:template> | |
</script> | |
<script type="text/javascript"> | |
var data = { | |
"movie": [ | |
{"title": "The Usual Suspects"}, | |
{"title": "Pulp Fiction"}, | |
{"title": "Independence Day"} | |
] | |
}, | |
htm = Defiant.render('books_template', data); | |
console.log(htm); | |
// The Usual Suspects<br> | |
// Pulp Fiction<br> | |
// Independence Day<br> | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment