Getting rid of @sequence="true/false"?

Hi all,

A while ago, @ndw and I had a mail conversation about sequence ports in XProc 3.0. In order to 
make it easier to learn XProc, we discussed about elimination non-sequence ports and @sequence, so 
that in XProc 3.0 all steps accept sequences on all ports.

Following this line of thought, some options are possible:

1. Nothing changes: All steps accepting sequences on a port in XProc 1.0 will do so in XProc 3.0. Steps that
do not accept a sequence will only raise an error, when an empty sequence is delivered. If not, they we process the
first document in the sequence as described and discard all others.

2. We simply move task of raising an error to the step and its semantic: Instead of having one global error (XD0006) we
could have more informative errors like (XS????: It is a dynamic error if not exactly one document appears on port "stylesheet"
of p:xslt).

3. Implicit looping: One possible consequence I personally like very much is the idea, that some steps (like p:add-attribute,
p:delete, p:insert etc.) do an implicit looping for the sequence. This might be more natural the XProc newbies and may appear attractive
to current users, because in some cases you will not need "p:for-each" any more. This would be inline with p:viewport in XProc 3.0 with does
implicit looping. For other steps, where implicit looping does not make sense (e.g. p:compare or p:http-request) we could choose option (1) 
or (2).

4. Bad idea, keep it like it is: You might say that the distinction between a document and a sequence of documents is very easy to grasp and that it is perfectly
established in XSLT, XQuery and other X-technologies. Also you might argue, that in XProc 3.0 we will have mixed sequences with XML and non-XML
documents and we would need a special treat when p:add-attribute is applied to a sequence of xml documents, JPEGs and texts.

What do you think?

Greetings from Germany,
Achim
------------------------------------------------
Achim Berndzen
achim.berndzen@xml-project.com

http://www.xml-project.com

Received on Friday, 22 September 2017 12:41:23 UTC