- From: Henry S. Thompson <ht@inf.ed.ac.uk>
- Date: Fri, 01 May 2009 15:13:09 +0100
- To: Norman Walsh <ndw@nwalsh.com>
- Cc: XProc Dev <xproc-dev@w3.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Norm was being a little casual. Here's the fully-articulated version
based using p:http-request, resulting in exactly the signature I
believe you want for my:tidy:
<p:pipeline xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
xmlns:my="http://www.ltg.ed.ac.uk/~ht/">
<p:declare-step type="my:tidy">
<p:output port="result"/>
<p:option name="uri" required="true"/>
<p:add-attribute match="c:request" attribute-name="href">
<p:with-option name="attribute-value" select="$uri">
<p:empty/>
</p:with-option>
<p:input port="source">
<p:inline>
<c:request override-content-type="text/plain" method="GET"/>
</p:inline>
</p:input>
</p:add-attribute>
<p:http-request/>
<p:exec command="tidy" source-is-xml="false" result-is-xml="true"
wrap-result-lines="false">
<p:with-option name="args" select="'-asxml --quiet yes --show-warnings no
--doctype omit --numeric-entities yes --output-xml yes'"/>
</p:exec>
<p:unwrap match="c:result"/>
</p:declare-step>
<my:tidy uri="http://www.ltg.ed.ac.uk/~ht/xx.html"/>
</p:pipeline>
That add-attribute+http-request idiom is my candidate for pulling out
as a declared step in a common library.
ht
- --
Henry S. Thompson, School of Informatics, University of Edinburgh
Half-time member of W3C Team
10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 651-1426, 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)
iD8DBQFJ+wN1kjnJixAXWBoRAjptAJ9Zk3NQ//A0Z7TkXWlapwSoTT7BgQCeJWu9
K7Nlvec9jQHw4PDoU494bQQ=
=cy8N
-----END PGP SIGNATURE-----
Received on Friday, 1 May 2009 14:13:50 UTC