Re: Wrapping of nodes into a document

On 10/2/07, Norman Walsh <ndw@nwalsh.com> wrote:
> / "Innovimax SARL" <innovimax@gmail.com> was heard to say:
> | On 10/2/07, Norman Walsh <ndw@nwalsh.com> wrote:
> |> / Innovimax SARL <innovimax@gmail.com> was heard to say:
> |> | In 5.1.1
> |> |
> |> | Please precise which nodes are allowed to be wrapped and how ?
> |> | [[
> |> | it is a dynamic error (err:XD0016) if the select expression on a
> |> | p:input returns anything other than a possibly empty set of nodes.
> |> | ]]
> |>
> |> I took an action at the 27 Sep 2007 telcon to clarify this. Our discussion
> |> on the telcon suggested that it was appropriate to select, comment,
> |> processing instruction, or element nodes. But, in fact, *each* selected
> |> node is turned into a document. So it's pointless to select anything other
> |> than element nodes. I propose:
> |>
> |>   It is a dynamic error (err:XD0016) if the select expression on a
> |>   p:input returns anything other than a possibly empty set of element
> |>   nodes.
> |>
> |> (I added the word element.)
> |>
> |
> | And what about select="/" ?
>
> Yeah, ok. It's a bit silly since it's the same as leaving off the
> select, but I guess it's also a bit pedantic to make it an error.

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 ?

Mohamed
-- 
Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 9 52 475787
Fax : +33 1 4356 1746
http://www.innovimax.fr
RCS Paris 488.018.631
SARL au capital de 10.000 €

Received on Tuesday, 2 October 2007 15:38:17 UTC