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

XSLT pattern matching in p:viewport - matching descendant nodes

From: <Toman_Vojtech@emc.com>
Date: Tue, 15 Jan 2008 09:15:30 -0500
Message-ID: <6E216CCE0679B5489A61125D0EFEC787095CF8F3@CORPUSMX10A.corp.emc.com>
To: <public-xml-processing-model-comments@w3.org>

Hi all,

I have the following p:viewport example:

...
<p:viewport match="section">
  <p:identity>
    <p:input port="source">
      <p:inline><foo/></p:inline>
    </p:input>
  </p:identity>
</p:viewport>
...

What I want to do is to replace every element "section" in the source
document by the element "foo". Suppose the source document looks as
follows:

<book>
  <section>
    <section>
      <section>
      </section>
    </section>
  </section>
</book>

I assume the result of applying the viewport should be this (correct me
if I am wrong):

<book>
  <foo/>
</book>

However, the specification is not clear about this. While for other
steps (such as p:add-attribute, for instance) it is desired to process
all matching nodes in the document tree, I think p:viewport should stop
descending the tree as soon as it finds a matching node and it should
not proceed with XSLT pattern matching on the descendant nodes.

Regards,
Vojtech


--
Vojtech Toman
Principal Software Engineer
EMC Corporation

Aert van Nesstraat 45
3012 CA Rotterdam
The Netherlands

Toman_Vojtech@emc.com
Received on Tuesday, 15 January 2008 14:12:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 15 January 2008 14:12:29 GMT