You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A lot of the standard steps don't accept sequences. E.g. p:wrap, p:delete, etc. Why not? It seems like an arbitrary limitation. Why not make all these steps accept sequences. They then just perform their magic on all members of the sequence (or do nothing in case of an empty sequence).
IMHO the fact that sequences are "special" is a left-over from the XProc 1 days. It is more in line with the XPath standard to think of a single document also as a sequence, but just with one member. If you look at it like that it makes sense to treat sequences of all sizes in the same way.
The text was updated successfully, but these errors were encountered:
Implicit sequences are certainly a possibility. I remember discussing this issue at the very first XProc f2f meeting. There was some support for implicit sequences and some support for explicit sequences (xsl:for-each and friends). In the end, the WG decided to go with explicit sequences. But that's not a special left over, it was a conscious design decision.
One compelling argument in favor of explicit sequences is early error detection. If all steps just accept sequences, even empty ones, then it's much harder to get feedback if you've wired things up badly. The pipeline runs, but produces nothing useful, or the wrong things. The fact that passing a sequence to xsl:add-attribute causes it to fail is a signal that you've done it wrong.
The trade-off is probably highly dependent on what the common use cases are for you.
A lot of the standard steps don't accept sequences. E.g.
p:wrap
,p:delete
, etc. Why not? It seems like an arbitrary limitation. Why not make all these steps accept sequences. They then just perform their magic on all members of the sequence (or do nothing in case of an empty sequence).IMHO the fact that sequences are "special" is a left-over from the XProc 1 days. It is more in line with the XPath standard to think of a single document also as a sequence, but just with one member. If you look at it like that it makes sense to treat sequences of all sizes in the same way.
The text was updated successfully, but these errors were encountered: