- From: David Cramer <david@thingbag.net>
- Date: Tue, 01 May 2012 18:09:03 -0500
- To: Romain Deltour <rdeltour@gmail.com>
- CC: XProc Dev <xproc-dev@w3.org>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Romain, Thanks for that. The p:group was indeed important, but there was more too. I ended up getting it to work using Geert Josten's ut:parameters utility step [1] mentioned in this thread [2]. Regards, David [1] https://github.com/grtjn/xproc-ebook-conv/blob/master/src/nl/grtjn/xproc/util/utils.xpl [2] http://web.archiveorange.com/archive/v/nvhn6tjvNdec7YLyd4yI On 05/01/2012 05:48 PM, Romain Deltour wrote: > As far as I understand this limitation on connections of p:variable > @select is to avoid chicken-and-eggs situations where a variable > could be based on the result of a step which itself uses the > variable. > > To clarify these situations, you need to wrap in a p:group the > variable and all the steps depending on it: > > … <p:group> <p:variable name="security" select="//c:param[@name = > 'security']/@value" xmlns:c="http://www.w3.org/ns/xproc-step"> > <p:pipe port="result" step="params"/> </p:variable> > > … other steps depending on $security … </p:group> > > <p:parameters name="params"> <p:input port="parameters"> <p:pipe > port="parameters" step="main"/> </p:input> </p:parameters> ... > > On 2 mai 2012, at 00:20, David Cramer wrote: > >> Hi there, I'm in the same situation as Kevin Flynn describes in >> this thread: >> >> http://lists.w3.org/Archives/Public/xproc-dev/2010Jul/0002.html >> >> I've tried Vojtech's suggestion (though I've implemented it >> incorrectly) and now receive "XS0019:Variable binding to result >> on params not allowed." from Calabash: >> >> ... <p:variable name="security" select="//c:param[@name = >> 'security']/@value" xmlns:c="http://www.w3.org/ns/xproc-step"> >> <p:pipe port="result" step="params"/> </p:variable> >> >> <p:parameters name="params"> <p:input port="parameters"> <p:pipe >> port="parameters" step="main"/> </p:input> </p:parameters> ... >> >> I'm quite puzzled as to how this should work, though it seems >> like extracting the value of a parameter into a variable for use >> in the pipeline should be a common task. >> >> Btw., I notice that search results to http://xprocbook.com now >> take you to empty pages. Is that intentional? >> >> Thanks, David > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJPoG0PAAoJEMHeSXG7afUhVPIH/iyXw6jK51+yFaJBUKoUDuzE GPL5kweq1hMfSEkEWGKIA0KB7nGHkYnEYsWzFstDGHlffdu1ZbSlucrs80jSvBCM Fn0irXAi5Zu/41UUPgmVVyRPWv3DiyxCMzIe69XJ6XbdVJB/nbbbDaC3NHs7ee9Z iyYe3D6/1MPMOdMZEZWOZD0wkAlQCYOJ8KBDTYQFkt61W7kVr2pEu9RC8zA6izp+ 4FvVWsO9FrxD8OUCABwLAbfuOdqmcqXk7CPG9byzJgY6VZF1YK/wIAD4Bi5PMcEm wE3/Pe9Zijxvp8I9v52TgSPCWiY6MINy1nCKZM7T2uSKGTt6FShBTcOL3Ohzalg= =vzUH -----END PGP SIGNATURE-----
Received on Tuesday, 1 May 2012 23:09:34 UTC