Re: On sequences

Achim Berndzen <achim.berndzen@xml-project.com> writes:
> Just to understand the full impact of your proposal: 
> Does this mean, that say "p:add-attribute" is supposed to add an
> attribute with the given value to all matched elements on ALL (xml)
> documents on the input port „source“? This would save a lot of
> p:for-each, if we need it at all. Looks great at the first view!

I think there are two seperable questions here.

1. Should we remove @sequence? If we do, steps can’t declare the
cardinality of documents on ports and it stops being an error for a
step to produce no output.

2. Having removed @sequence, what are steps to do with sequences?
We could say, “nothing changes.” The p:add-attribute step still
expects one input and its an error if more than one is provided.
Or we could introduce “implicit iteration”.

For lots of steps, implicit iteration looks quite tempting. But
not for all. What are the semantics of implicit iteration on
p:compare, p:http-request, p:xslt, p:xquery, p:validate-with-*

The working group certainly discussed implicit iteration, but
ultimately rejected it. I can’t reconstruct the arguments for and
against off the top of my head.

> What I do not fully see is compatibility (usability) of older (XProc
> 1.0) pipelines. Will all (most) of them produce the same result, if we
> simply ignore any „@sequence“ and change the behaviour of the step?
> Any thoughts?

We’d be relaxing a rule, so I’d expect most pipelines to work the same
way. Pipelines that don’t raise errors today don’t send sequences to
most steps.

That might not be 100% true (you could have written a pipeline with a
try/catch to detect the sequence issue and now that wouldn’t cause an
exception) of course.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh
Lead Engineer
MarkLogic Corporation
Phone: +1 512 761 6676
www.marklogic.com

Received on Saturday, 22 October 2016 12:12:59 UTC