sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From npelt...@apache.org
Subject svn commit: r1807292 - /sling/site/trunk/content/documentation/bundles/sling-pipes.mdtext
Date Mon, 04 Sep 2017 19:34:02 GMT
Author: npeltier
Date: Mon Sep  4 19:34:02 2017
New Revision: 1807292

URL: http://svn.apache.org/viewvc?rev=1807292&view=rev
Log:
enhance filter pipe documentation

Modified:
    sling/site/trunk/content/documentation/bundles/sling-pipes.mdtext

Modified: sling/site/trunk/content/documentation/bundles/sling-pipes.mdtext
URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles/sling-pipes.mdtext?rev=1807292&r1=1807291&r2=1807292&view=diff
==============================================================================
--- sling/site/trunk/content/documentation/bundles/sling-pipes.mdtext (original)
+++ sling/site/trunk/content/documentation/bundles/sling-pipes.mdtext Mon Sep  4 19:34:02
2017
@@ -206,11 +206,18 @@ outputs the input resource if its matche
 - `conf` node tree that will be tested against the current input of the pipe, each `/conf/sub@prop=value`
will triggers a test
 on `./sub@prop` property of the current input, testing if its value matches `value` regex.
If the special `slingPipesFilter_noChildren=${true}`
 property is there with the value instantiated as a true boolean, then filter will pass if
corresponding node has no children.
+- `slingPipesFilter_test='${...}'` evaluates the property value, and filters out the stream
if the expression is not a boolean or false
 - `slingPipesFilter_not='true'` inverts the expected result of the filter
 
-`echo('/content/foo').grep('foo','bar','slingPipesFilter_not',true).run()` will either return
`/content/foo` either nothing depending on it
+    echo('/content/foo').grep('foo','bar','slingPipesFilter_not',true).run()
+
+will either return `/content/foo` either nothing depending on it
 not containing `@foo=bar`
 
+    echo('content/foo').name('FOO').grep('slingPipesFilter_test','${FOO.foo == "bar"}'
+
+is an equivalent
+
 ### containers
 ##### Container Pipe
 assemble a sequence of pipes



Mime
View raw message