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

p:viewport - number of matching documents

From: <Toman_Vojtech@emc.com>
Date: Mon, 27 Oct 2008 06:32:11 -0400
Message-ID: <6E216CCE0679B5489A61125D0EFEC7870D2EB183@CORPUSMX10A.corp.emc.com>
To: <public-xml-processing-model-comments@w3.org>

Hi all,

Suppose I have the following XML document:

    <para>Some paragraph.</para>
    <para>Some paragraph.</para>
    <para>Some paragraph.</para>
      <para>Nested paragraph.</para>

and I apply the following p:viewport:

  <p:viewport match="para">

How many documents do I get in the viewport body? Four (that is, only
the top-level "para" elements are found) of five (that is, the nested
"para" is found as well)? This also affects what p:iteration-size()
returns in this case.

Based on the spec ("The result of the p:viewport is a copy of the
original document where the selected subtrees have been replaced by the
results of applying the subpipeline to them."), returning more than four
matches doesn't make much sense to me in this case, so I think that
p:viewport should give me only four matches, but where does this follow

Received on Monday, 27 October 2008 10:33:29 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:41:08 UTC