Bind context item to stdin in zorbacmd
Bug #1042992 reported by
mb21
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zorba |
New
|
Medium
|
Sorin Marian Nasoi |
Bug Description
After fixing bug #1025564, the only step left to make zorba a great command line tool would be to bind the context item (.) to the stdin. Then you could do stuff like:
echo '<root>
To implement this, one probably needs to check whether the context item is an unbound variable, and if it is, bind it to stdin and maybe write to stderr: "Waiting for input from stdin..." (in case somebody uses the dot in his XQuery program but doesn't realize he has to pipe something in).
On the other hand, if the context item is not an unbound variable (i.e. it isn't used at all, or manually bound to something), then do nothing.
description: | updated |
Changed in zorba: | |
importance: | Undecided → Wishlist |
Changed in zorba: | |
assignee: | nobody → Sorin Marian Nasoi (sorin.marian.nasoi) |
importance: | Wishlist → Medium |
To post a comment you must log in.
An alternate approach would be to accept "-" as an argument to --context-item. That would make it explicit at the cost of being a bit more verbose. A similar approach could be used to bind stdin to external variables, eg. "-e myvar=-".