forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ross Gardler (JIRA)" <j...@apache.org>
Subject [jira] Created: (FOR-947) Improved mathcing
Date Sun, 03 Dec 2006 22:23:20 GMT
Improved mathcing
-----------------

                 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

       

Mime
View raw message