Re: p:viewport vs. p:delete

On 4/22/07, Norman Walsh <ndw@nwalsh.com> wrote:
>
> The description of p:delete currently reads:
>
>   The Delete step deletes the matching items from the document on input
>   port 'source' and outputs the results to the output port 'result'. The
>   matching items are specified via an XPath in the option named
>   'target'.
>
> Is the 'target' XPath expression a select expression or a match pattern?


It probably makes more sense as a match pattern.

If it's a select expression, why is it different from viewport? It seems
> to me if I've had a viewport that replaces all "h:div[@class='informal']"
> with something else and now I decide I want to simply delete those h:divs,
> I should be able to use the same pattern.
>
> If it's a match pattern, how many other standard components use match
> patterns?


Steps that should use match:

   p:replace

Steps that could use either:

   p:insert
   p:wrap

Steps that should use select:

   p:rename

My criteria being whether it makes sense for the step to
operate on "inner matches" (nodes that are contained
in other nodes that match the XPath).


Perhaps the option should be named either 'select' or 'match' so that
> it's clear which kind of expression is intended.



I'd be happy to change the name as appropriate.




-- 
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."

Bertrand Russell in a footnote of Principles of Mathematics

Received on Monday, 23 April 2007 21:42:21 UTC