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:

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

and I apply the following p:viewport:

  <p:viewport match="para">
    ...
  </p:viewport>


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
from?

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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:28:25 UTC