Adding a stylesheet PI

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Suppose you have a nice pipeline which constructs some nice XML
document, and you want to add a (static) stylesheet PI to it.

I have not found any clean way to do this -- I've ended up doing this:

 <p:insert match="/foo" position="last-child">
  <p:input port="insertion">
   <p:pipe step="[previous]" port="result"/>
  </p:input>
  <p:input port="source">
   <p:inline>
    <foo><?xml-stylesheet type="text/xsl" href="oToHtml.xsl"?></foo>
   </p:inline>
  </p:input>
 </p:insert>
 
 <p:unwrap match="/foo"/>

Can anyone improve on that?

ht
- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
      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 from me _always_ has a .sig like this -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFNfzgzkjnJixAXWBoRAnzqAJ9RQlMBQiaY7YufbqAfou3l5NiRAwCdH1sW
u1lxAnCqtemAI93+c9BTxbE=
=GPk1
-----END PGP SIGNATURE-----

Received on Tuesday, 15 March 2011 09:58:44 UTC