pipeline
Written as pipeline(argnum flags):options in a transform expression.
| Minimum arguments | -1 |
| Maximum arguments | no limit |
| Default arguments | 0 |
| Argument modes | SINGLE, MULTIPLE |
Documentation
Section titled “Documentation”Process a pipeline of mixed transform expressions and arguments.
This transform applies a sequence of nested transforms and arguments to input data.
Notes:
- First argument is always the input value
- Flag stop_on_empty to terminate pipeline early on empty results
- Flag output_all to output both stack and pipeline last step result. By default, only pipeline’s last step result is output.
| Flag | Letter |
|---|---|
| spread_input | s |
| spread_output | S |
| noncaptive_input | I |
| arg_num_flexible | f |
| stop_on_empty | e |
| output_all | a |
Examples
Section titled “Examples”Zero arg pipeline
Section titled “Zero arg pipeline”Input args: []Transforms: "pipeline(*):[\"a\", \"b\", \"join(2):\n\", \"c\", \"join(*):.\"]"Output: "a\nb.c"One arg as input for transform pipeline with mixed args and transform exprs
Section titled “One arg as input for transform pipeline with mixed args and transform exprs”Input args: ["a"]Transforms: "pipeline:[\"b\", \"join(2):\n\", \"c\", \"join(*):.\"]"Output: "a\nb.c"pipeline transform with Early-stop-on-empty flag on
Section titled “pipeline transform with Early-stop-on-empty flag on”Input args: ["abc","xyz"]Transforms: "pipeline(*e):[\"regex:w\", \"hello\", \"join(*): \"]"Output: nullSpecial implicit pipeline transform without the pipepline: prefix
Section titled “Special implicit pipeline transform without the pipepline: prefix”Input args: [{"content":"<sitemapindex xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"><sitemap><loc>https://www.jbhifi.com.au/sitemap_productsd_1.xml?from=1614264664162&to=1620533543010</loc></sitemap><sitemap><loc>https://www.jbhifi.com.au/sitemap_products_2.xml?fromdd=1620533575778&to=1625088262242</loc></sitemap></sitemapindex>"}]Transforms: ["keypath:content","xpath3(N)://sitemap/loc[contains(text(), \"_products\")]/text()"]Output: ["https://www.jbhifi.com.au/sitemap_productsd_1.xml?from=1614264664162&to=1620533543010","https://www.jbhifi.com.au/sitemap_products_2.xml?fromdd=1620533575778&to=1625088262242"]