This is an automated email from the ASF dual-hosted git repository.
git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/sling-site.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 78072cd Automatic website deployment from
https://ci-builds.apache.org/job/Sling/job/modules/job/sling-site/job/master/125/
78072cd is described below
commit 78072cdfbeb2fc0fdb3774a259b5f87980c0397b
Author: jenkins <[email protected]>
AuthorDate: Thu Mar 18 06:13:26 2021 +0000
Automatic website deployment from
https://ci-builds.apache.org/job/Sling/job/modules/job/sling-site/job/master/125/
---
documentation/bundles/resource-merger.html | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/documentation/bundles/resource-merger.html
b/documentation/bundles/resource-merger.html
index 1759d45..57310a9 100644
--- a/documentation/bundles/resource-merger.html
+++ b/documentation/bundles/resource-merger.html
@@ -137,12 +137,31 @@
<tr><th>Property Name </th><th> Type </th><th> Description</th></tr>
</thead>
<tbody>
-<tr><td>sling:hideProperties </td><td> String[] </td><td> Hides the properties
with the given names. <code>*</code> hides all properties (since version 1.3.2
the wildcard only affects underlying properties and no longer local ones, see
also <a
href="https://issues.apache.org/jira/browse/SLING-5468">SLING-5468</a>).</td></tr>
-<tr><td>sling:hideChildren</td><td> String[] </td><td> Hides the child
resources with the given names. <code>*</code> hides all child resources (since
version 1.3.2 the wildcard only affects underlying child resources and no
longer local ones, see also <a
href="https://issues.apache.org/jira/browse/SLING-5468">SLING-5468</a>). If one
value starts with <code>!</code> this is a negation (which means the property
with the given value should not be hidden). Since by default nothing is hidden
[...]
+<tr><td>sling:hideProperties </td><td> String[] </td><td> Hides the properties
matching the given names. The exact syntax is described below.</td></tr>
+<tr><td>sling:hideChildren</td><td> String[] </td><td> Hides the child
resources with the given names. The exact syntax is described below.</td></tr>
<tr><td>sling:hideResource </td><td> Boolean </td><td> If <code>true</code>
then the resource with the name which contains this property should not be
exposed!</td></tr>
<tr><td>sling:orderBefore </td><td> String </td><td> Contains the name of the
preceding sibling resource. This is influencing the order of resources when
calling e.g. <code>Resource.listChildren()</code> or
<code>Resource.getChildren()</code> on the merged resource. This is only
necessary if the default child resource order is not sufficient (see
below).</td></tr>
</tbody>
</table>
+<h2><a href="#slinghidepropertieshidechildren-syntax"
id="slinghidepropertieshidechildren-syntax">sling:hideProperties/hideChildren
syntax</a></h2>
+<p>Both properties <code>sling:hideProperties</code> and
<code>sling:hideChildren</code> take multiple string values which either act as
allow list or as deny list. They are treated as deny list if the first value is
starting with an odd number of <code>!</code> otherwise as allow list.</p>
+<p>In case negated (odd number of leader <code>!</code> ) and non-negated
values are mixed in one property the first one determines the list type, and
all values of the other type are just skipped!</p>
+<p>For deny lists an implicit wildcard is assumed, i.e. everything is allowed
except for the names given in negated form. Giving an explicit wildcard
(<code>*</code>) is optional and does not change the semantics.</p>
+<p>Each value can either be <code>*</code> which is treated as wildcard (i.e.
matches all names) or a string with no placeholders. That string is unescaped
by removing half of the leading <code>!</code> characters. That allows to
negate arbitrary item names (even ones starting with one or multiple
<code>!</code>).</p>
+<table>
+<thead>
+<tr><th>Escaped Value </th><th> Unescaped Value </th><th> Is negated</th></tr>
+</thead>
+<tbody>
+<tr><td>!name </td><td> name </td><td> yes</td></tr>
+<tr><td>name </td><td> name </td><td> no</td></tr>
+<tr><td>!!name </td><td> !name </td><td> no</td></tr>
+<tr><td>!!!name </td><td> !name </td><td> yes</td></tr>
+<tr><td>!!!!name!test </td><td> !!name!test </td><td> no</td></tr>
+</tbody>
+</table>
+<p>The matching algorithm just compares the item name (either resource or
property name) with each of the given unescaped values. It matches if at least
one is equal from an allow list or none is equal from a deny list.</p>
+<p>Since version 1.3.2 the wildcard only affects underlying child resources
and no longer local ones, see also <a
href="https://issues.apache.org/jira/browse/SLING-5468">SLING-5468</a>.</p>
<h1><a href="#child-resource-order" id="child-resource-order">Child Resource
Order</a></h1>
<p>For a merged resource the order of its child resources is the following:
First the ones from the underlying resource, then the ones from the overlying
resources.</p>
<p>In case the same child is defined in more than one resource, its position
is taken from the highest overlaying resource (since version 1.3.2, see also <a
href="https://issues.apache.org/jira/browse/SLING-4915">SLING-4915</a>, for
some more examples for more complicated merges look at <a
href="https://issues.apache.org/jira/browse/SLING-6956">SLING-6956</a>). For
example:</p>
@@ -247,7 +266,7 @@ resulting order: child1, child5, child2, child3, child4
</div><footer class="footer">
<div class="content has-text-centered is-small">
<div class="revisionInfo">
- Last modified by <span class="author">Bertrand
Delacretaz</span> on <span class="comment">Fri Sep 29 15:57:01 2017 +0200</span>
+ Last modified by <span class="author">Konrad
Windszus</span> on <span class="comment">Thu Mar 18 07:05:06 2021 +0100</span>
</div> <p>
Apache Sling, Sling, Apache, the Apache feather logo,
and the Apache Sling project logo are trademarks of The Apache Software
Foundation. All other marks mentioned may be trademarks or registered
trademarks of their respective owners.
</p><p>