- From: Alex Miłowski <alex@milowski.com>
- Date: Thu, 25 Feb 2016 06:21:39 -0800
- To: XProc WG <public-xml-processing-model-wg@w3.org>
The previous AVT work had no way to handle non-XML data formats.
We need to separate the use of AVT to specify step options from their
use in constructing inputs in a particular syntax.
On Thu, Feb 25, 2016 at 1:12 AM, Henry S. Thompson <ht@inf.ed.ac.uk> wrote:
> Alex Miłowski writes:
>
>> Lacking a media type for mustache, expect this to work as:
>>
>> let $options := {"count" : count($source/*/para)}
>> data "text/plain" '{"numParas" : {{count}}}' -> x:mustache($options)
>> -> parse-json()
>
> Yes, but now you've given away comparability to XProc v.2 AVTs, in that
> all substitutions have to be serialised. That is, if you have variables
> whose values are JSON structures, you can't plug them in directly, you
> will have to serialise them yourself, or, build a version of mustache
> which does that for you. So we're back to a separate templating step
> for each media type, each with its own syntax, which is less than ideal,
> but probably unavoidable.
>
> ht
> --
> 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]
--
--Alex Miłowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."
Bertrand Russell in a footnote of Principles of Mathematics
Received on Thursday, 25 February 2016 14:22:10 UTC