- From: Henry S. Thompson <ht@inf.ed.ac.uk>
- Date: Thu, 26 Feb 2009 17:33:33 +0000
- To: Norman Walsh <ndw@nwalsh.com>
- Cc: public-xml-processing-model-comments@w3.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I think Norm's use-case can't arise, for reasons discussed on today's
call, but Alex's question ("How do I send an XQuery which contains
only properly balanced XML, e.g. suppose I have constructed:
<c:body content-type="text/plain">
<books>
{ for $b in //book
return $b/title
}
</books>
</c:body>
will that work?
Answer: No, Don't Do That, you must do:
<p:escape-markup name="em">
<p:input port="source">
<p:inline>
<root>
<books>
{ for $b in //book
return $b/title
}
</books>
</root>
</p:inline>
</p:input>
</p:escape-markup>
<p:insert position='first-child'>
<p:input port="source">
<p:inline>
<c:body content-type="text/plain"/>
</p:inline>
</p:input>
<p:input port="insertion" select="/root/node()">
<p:pipe step="em" port="result"/>
</p:input>
</p:insert>
<p:http-request. . .
ht
[I note that the documentation of p:escape-markup is lacking clarity
wrt what is preserved of the document element -- if it specified that
its attrs were passed through, then the above could be reversed and
simplified.]
[I note that the documentation of p:escape-markup appears to contain
nearly the same note twice, and a _very_ odd final paragraph]
- --
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)
iD8DBQFJptJwkjnJixAXWBoRAke/AJwM7eY+ulm/XKQZp99nsKSHxIk2lwCdGd9W
3LfYzvRsKU+AgKVeAyyf7ks=
=wIuX
-----END PGP SIGNATURE-----
Received on Thursday, 26 February 2009 17:34:32 UTC