W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > May 2007

Re: Escaped markup

From: Alex Milowski <alex@milowski.org>
Date: Tue, 1 May 2007 06:55:25 -0700
Message-ID: <28d56ece0705010655v5b8761edu2bbe5812df03c9ad@mail.gmail.com>
To: "XProc WG" <public-xml-processing-model-wg@w3.org>
On 5/1/07, Innovimax SARL <innovimax@gmail.com> wrote:
>
>
> What will happen to Misc [1] declared before root element ? after root
> element ?
>
> What will happen to attribute in the root element ? to namespace
> declaration in the root element ?



You can only escape children of an element (or unescape children).

As such, the misc is OK.

For example, consider:

 <description>
&lt;!-- my document-->
&html> ... &/html>
</description>

When p:unescape-markup runs it uses a wrapper:

<root>
<!--my document-->
<html> ... </html>
</root>

that it throws away.

Then you get:

<description>
<!-- my document-->
<html> ... </html>
</description>

as output.

Escape markup works in the reverse in that it considers the children of
the document element as a serialized string.  The output of the above
should be where we started.

Right now both of these steps operate on the document element and require
a viewport to scope them to particular elements.  Maybe we should add
a match option to them.



-- 
--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 13:55:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:51 GMT