[ http://issues.apache.org/jira/browse/FOR-947?page=all ]
Ross Gardler updated FOR-947:
-----------------------------
Summary: Improved matching (was: Improved mathcing)
> Improved matching
> -----------------
>
> Key: FOR-947
> URL: http://issues.apache.org/jira/browse/FOR-947
> Project: Forrest
> Issue Type: Improvement
> Components: Forrest2
> Reporter: Ross Gardler
> Priority: Minor
>
> The implementation of matching in Forrest2, at the time of writing, is
> extremely powerful (using RE's), however, RE's are not the easiest thing for
> users to understand, unless it is already a part of ther skill set.
> A proposal for Cocoon 3 suggests a number of alternative matching methods
> (see [1]):
> "4) The match method is specified by the name of the attribute that
> provides the match pattern. Four methods would be supported:
> ? "equals": literal match from first to last position, no magic
> metacharacters
> ? "contains": match w/ leading or trailing characters
> ? "path": a better name for today's "wildcard", i.e. the "*" and "**"
> we love to use!
> ? "regexp": regular expression match."
> If used in Forrest2 this would give us a locationmap that looks something
> like this:
> <location equals="foo.html">
> <source href="classpath:/content/foo.xml"/>
> </location>
> <location contains="foo">
> <source href="classpath:/content/foo.xml"/>
> </location>
> <location path="**/foo.html">
> <source href="classpath:/content/foo.xml"/>
> </location>
> <location regecp=".*/foo.html">
> <source href="classpath:/content/foo.xml"/>
> </location>
> If we start to implement this we should first see if Cocoon has gone this way
> (and share code) or we should discuss with the Cocoon community to ensure our
> code would be of use to them if they implement the proposal in the linked RT
> [1]
> [1] http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=116518128306132&w=2
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira