- From: Henry S. Thompson <ht@inf.ed.ac.uk>
- Date: Wed, 24 Feb 2016 19:07:35 +0000
- To: Alex Miłowski <alex@milowski.com>
- Cc: XProc WG <public-xml-processing-model-wg@w3.org>
Further to the discussion just now, and thanks to Alex for the link to
moustache [1], I claim that e.g.
data "application/json" '{"fruit": "orange"}' -> x:mustache($options)>> $output
works only because it includes no actual templating, so functions as the
identity step, and e.g.
let $options := {"count" : count($source/*/para)}
data "application/json" '{"numParas" : {{count}}}' -> x:mustache($options)
will just cause a JSON parse error, before it ever gets to the mustache step.
ht
[1] https://mustache.github.io/mustache.5.html
--
Henry S. Thompson, School of Informatics, University of Edinburgh
10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
[mail from me _always_ has a .sig like this -- mail without it is forged spam]
Received on Wednesday, 24 February 2016 19:08:21 UTC