Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: the match attribute on p:viewport should not be an AVT #830

Closed
ndw opened this issue Jul 6, 2019 · 5 comments

Comments

Projects
None yet
3 participants
@ndw
Copy link
Contributor

commented Jul 6, 2019

The viewport step integrates into pipeline construction fairly deeply. I'd like to make the match attribute static in XProc 3.0. I'm not saying it'd be impossible to make match dynamic, but I think it's potentially a lot more complicated to implement and I don't believe anyone's ever asked for it. We just made as many things as we could AVTs.

I also think that if it's allowed to be dynamic, users could reasonably expect to use p:with-option to set it, and I really don't want to go there.

@ndw ndw changed the title Proposal: `match` on p:viewport should not be an AVT Proposal: the match attribute on p:viewport should not be an AVT Jul 6, 2019

@eriksiegel

This comment has been minimized.

Copy link
Contributor

commented Jul 8, 2019

I concur

@gimsieke

This comment has been minimized.

Copy link
Contributor

commented Jul 8, 2019

I always considered it a Calabash bug that I couldn't use variables in the match attribute of p:viewport. Because according to the 1.0 spec, you can. And in Morgana, you can, too. So if you want to rule this out in the spec, I'm vehemently against it.

@gimsieke

This comment has been minimized.

Copy link
Contributor

commented Jul 8, 2019

Maybe no one asked for it, but the fact that I couldn't use a match expression with a variable in Calabash was the reason I didn't write an article about XProc 2 years ago. On my way to XML London, I created this example pipeline. What was intended as a showcase for a straightforward pipeline (extract files from a zip based on a regex that matches their names), proved to be inexplicably difficult. I had to use the match attribute of p:add-attribute in order to attach an extract="yes" option to the archive listing because I couldn't access the regex variable in the match attribute of p:viewport.
Achim later confirmed my assumption that match on p:viewport should be processor-evaluated and therefore be able to compute the expression dynamically.
The fact that I couldn't make this simple example self-explanatory in Calabash was the main reason I didn't complete the xml.com article back then.

@ndw

This comment has been minimized.

Copy link
Contributor Author

commented Jul 8, 2019

I don't know where you or Achim got the impression that it should have been possible to set this value dynamically in 1.0 (there are no AVTs and you can't use p:with-option in compound steps).

However, I take your response as a "hard no" to my proposal :-)

Simple matter of implementation, I guess.

@ndw

This comment has been minimized.

Copy link
Contributor Author

commented Jul 8, 2019

@ndw ndw closed this Jul 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.