Browse files

[readme] added syntax highlighting

  • Loading branch information...
dscape committed Sep 11, 2011
1 parent 05542d9 commit 6664ac3bd0db1a7bd3bf99d18bd70ef2376b67d7
Showing with 10 additions and 0 deletions.
  1. +10 −0
@@ -27,16 +27,21 @@ used in any XQuery processor
A quick example how to use mustache.xq:
+``` xquery
import module namespace mustache = "mustache.xq"
at "mustache.xqy";
mustache:render( 'Hello {{text}}!', '{ "text": "world"}' )
+``` xquery
<div>Hello world!</div>
A slightly more complicated example
+``` xquery
'<h1>{{header}}</h1> {{#bug}} {{/bug}}
@@ -57,9 +62,11 @@ A slightly more complicated example
{"name": "blue", "link": true, "url": "#Blue"}
"empty": false }')
+``` xml
@@ -72,6 +79,7 @@ Outputs:
<a href="#Blue">blue</a>
For more (fun) examples refer to test/tests.xml. If you are new to mustache you can use it to learn more about it.
@@ -114,11 +122,13 @@ This will help us be faster fixing the problem.
An example for a Hello World test would be:
+``` xml
<test name="Hello World">
<template>{'Hello {{word}}!'}</template>
<hash>{'{"word": "world"}'}</hash>
<output><div>Hello world !</div></output>
This is not the actual test that we run (you can see a list of those in test/index.xqy) but it's all the information we need for a bug report.

0 comments on commit 6664ac3

Please sign in to comment.