Re: Escaped markup

On 5/1/07, Norman Walsh <ndw@nwalsh.com> wrote:
>
> / 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>
> &lt;?my-funky-pi i prefer to see here?>
> &lt;!-- my prefered first comment-->
> &lt;root attribute-i-like="value-of-attribute"
> xmlns:my-funky-namespace="funky
> rulez">
> ...
> &lt;/root>
> &lt;!-- my prefered last comment-->
> &lt;?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.



The main use case for this step is the RSS description element (which is
what I
included in my example.  Doing the above does allow handling the
RSS description element.

I could see having the step work in two ways:

  * Given a match pattern via an option called 'match', it will
    escape particular elements (e.g. the RSS description element).
  * If that match pattern is omitted, you get the whole escaped
    document wrapped in a c:result element as you've demonstrated
    above.


-- 
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."

Bertrand Russell in a footnote of Principles of Mathematics

Received on Tuesday, 1 May 2007 15:49:30 UTC