- From: Norman Walsh <ndw@nwalsh.com>
- Date: Tue, 01 May 2007 10:35:26 -0400
- To: public-xml-processing-model-wg@w3.org
- Message-ID: <87irbcehn5.fsf@nwalsh.com>
/ Innovimax SARL <innovimax@gmail.com> was heard to say:
| Sorry I was talking about this
| [[
| <?xml version="1.0"?>
| <?my-funky-pi i prefer to see here?>
| <!-- my prefered first comment-->
| <root attribute-i-like="value-of-attribute" xmlns:my-funky-namespace="funky
| rulez">
| ...
| </root>
| <!-- my prefered last comment-->
| <?my-funky-pi i prefer to see here?>
| ]]
If you run that through escape-markup, you should get:
<c:result>
<?my-funky-pi i prefer to see here?>
<!-- my prefered first comment-->
<root attribute-i-like="value-of-attribute" xmlns:my-funky-namespace="funky
rulez">
...
</root>
<!-- my prefered last comment-->
<?my-funky-pi i prefer to see here?>
</c:result>
I said before, and I still strongly believe, that it's totally broken
for p:escape-markup not to escape the "root element". It should return
a c:result containing the entire document as a single text node.
Note that it's a bad idea to escape the XML declaration on the source
document because you're not allowed to ever have that as a PI in a
document.
And p:unescape-markup should throw away whatever document element is
provided and return c:result containing the unescaped content, in
other words:
<c:result>
<?my-funky-pi i prefer to see here?>
<!-- my prefered first comment-->
<root attribute-i-like="value-of-attribute" xmlns:my-funky-namespace="funky
rulez">
...
</root>
<!-- my prefered last comment-->
<?my-funky-pi i prefer to see here?>
</c:result>
Be seeing you,
norm
--
Norman Walsh <ndw@nwalsh.com> | To the man who is afraid everything
http://nwalsh.com/ | rustles.-- Sophocles
Received on Tuesday, 1 May 2007 14:35:37 UTC