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

Re: Wrapping of nodes into a document

From: Norman Walsh <ndw@nwalsh.com>
Date: Tue, 02 Oct 2007 19:40:18 -0400
To: public-xml-processing-model-wg@w3.org
Message-ID: <m2hcl9hyql.fsf@nwalsh.com>
/ Alex Milowski <alex@milowski.org> was heard to say:
| On 10/2/07, Innovimax SARL <innovimax@gmail.com> wrote:
|> Ok but it suddently raise a question in my mind
|> Suppose this is the content of a document
|> <?xml version="1.0"?>
|> <?my-py I like it ?>
|> <!-- my comment -->
|> <root />
|> <!-- my comment -->
|> <?my-py I like it ?>
|> If I make a for-each on it, I will loose the PI and the comments, right ?
| You shouldn't because they are the children of the document.  The XML
| processing instruction isn't present as a child according to the infoset
| and so shouldn't be preserved when wrapped.

In the context of this thread, I thought Mohamed was asking if the PIs
and comments would be lost if his for-each was:

   <for-each select="root"/>

And I think the answer then is yes. If the for-each doesn't have a
select expression, then the whole document, PIs, comments, and all
goes through.

                                        Be seeing you,

Norman Walsh <ndw@nwalsh.com> | If you imagine that once you have
http://nwalsh.com/            | accomplished your ambitions you will
                              | have time to turn to the Way, you will
                              | discover that your ambitions never come
                              | to an end.--Yoshida Kenko

Received on Tuesday, 2 October 2007 23:40:35 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:44 UTC