You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Ben Peter <bp...@ben-peter.com> on 2013/10/29 11:25:58 UTC

sling:match and mapping

Hi,


if I read [1] right, it is possible to use backreferences to matching
groups in the path for creating the URL in RR.map()

Does this outdate the warning regarding usage of regular expressions on
[2]? It now says

"Since the entries in the /etc/map are also used to reverse map any
resource paths to URLs, using regular expressions in the Root Level
Mappings prevent the respective entries from being used for reverse
mappings. Therefor, it is strongly recommended to not use regular
expression matching, unless you have a strong need."

Would it make sense to change the last sentence to the following or similar?

"Therefore, it is strongly recommended to only use regular expression
matching in sling:match if you set up corresponding entries using regular
expressions in sling:internalRedirect and backreferences in sling:match to
allow the resolutions enabled by regex matching to be matched back when
mapping content paths to URLs"

[1] https://issues.apache.org/jira/browse/SLING-2560
[2]
http://sling.apache.org/documentation/the-sling-engine/mappings-for-resource-resolution.html

Cheers
Ben
-- 
Ben Peter
M: +49 151 27580088