Re: Parameter handling

That reminds me the p:let proposal of Alex

http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2006May/0087



On 3/28/07, Henry S. Thompson <ht@inf.ed.ac.uk> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Yeah, there's a missing functionality -- we talked at one point about
> generalising 'replace' and 'set-attributes' with something you might
> call 'set-value', with args an xpath to select a domain, an xpath to
> select a target relative to that, and an xpath to select a value. . .
>
> Then you could do:
>
> <p:set-value>
>  <p:option name="domain" value="c:body"/>
>  <p:option name="target" value="."/>
>  <p:option name="value" value="$parm"/>
>  <p:input port="source">
>   <p:inline>
>     <c:http-request method="post" href="http://example.com/form-action">
>       <c:entity-body content-type="application/x-www-form-urlencoded">
>         <c:body>[will be replaced]</c:body>
>       </c:entity-body>
>     </c:http-request>
>    </p:inline>
>  </p:input>
> </p:set-value>
>
> You could of course also do it with the equivalent bit of XSLT:
>
> <p:xslt>
>  <p:parameter name="content" value="$parm"/>
>  <p:input port="source">
>   <p:inline>
>     <c:http-request method="post" href="http://example.com/form-action">
>       <c:entity-body content-type="application/x-www-form-urlencoded">
>         <c:body>xyzzy</c:body>
>       </c:entity-body>
>     </c:http-request>
>    </p:inline>
>  </p:input>
> </p:set-value>
> <p:input port="stylesheet">
>  <xsl:ss>
>   <xsl:template match="node()|@*"/>
>     <xsl:copy>
>      <xsl:apply-templates select="node()|@*"/>
>     </xsl:copy>
>   </xsl:template>
>   <xsl:template match="c:body">
>    <xsl:copy>
>     <xsl:apply-templates select="@*"/>
>      <xsl:value-of select="$content"/>
>     </xsl:apply-templates>
>    </xsl:copy>
>   </xsl:template>
>  </xsl:ss>
> </p:input>
> </p:xslt>
>
> Richard may have something to add about a tool we use in Edinburgh to
> make it trivial to do a streaming step which only handles this sort of
> stylesheet.
>
> ht
> - --
>  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
>                      Half-time member of W3C Team
>     2 Buccleuch Place, Edinburgh EH8 9LW, 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 really from me _always_ has this .sig -- mail without it is forged spam]
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.6 (GNU/Linux)
>
> iD8DBQFGCnBZkjnJixAXWBoRApJLAJ45kl1mTg8+/P5bcowbOxzBHJte7gCdG61l
> GuDlw3a4cuQPPbAbPuuGeNA=
> =bfIC
> -----END PGP SIGNATURE-----
>
>


-- 
Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 8 72 475787
Fax : +33 1 4356 1746
http://www.innovimax.fr
RCS Paris 488.018.631
SARL au capital de 10.000 €

Received on Wednesday, 28 March 2007 13:50:21 UTC