Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 50525 invoked from network); 20 Sep 2006 08:39:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Sep 2006 08:39:41 -0000 Received: (qmail 57428 invoked by uid 500); 20 Sep 2006 08:39:38 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 57349 invoked by uid 500); 20 Sep 2006 08:39:37 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 57335 invoked by uid 99); 20 Sep 2006 08:39:37 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Sep 2006 01:39:37 -0700 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received: from ([146.109.240.105:6789] helo=irp0a.swx.com) by idunn.apache.osuosl.org (ecelerity 2.1 r(10620)) with ESMTP id 1E/00-00532-33EF0154 for ; Wed, 20 Sep 2006 01:39:17 -0700 Received: from unknown (HELO gate0a.unix.swx.ch) ([192.168.252.17]) by irp0a.swx.com with ESMTP; 20 Sep 2006 10:39:11 +0200 X-IronPort-AV: i="4.09,189,1157320800"; d="scan'208"; a="2474668:sNHT49696348" Received: from CIWMEXZSA0E.ex.ordersx.org (localhost [127.0.0.1]) by gate0a.unix.swx.ch (8.13.4/8.13.4) with ESMTP id k8K8dBnZ004551 for ; Wed, 20 Sep 2006 10:39:11 +0200 (MEST) Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2663 Importance: normal Priority: normal Subject: Wildcard matcher matching wild things Date: Wed, 20 Sep 2006 10:39:11 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Wildcard matcher matching wild things thread-index: AcbckD7Mth3BecpUTzisDU3lm+h8GA== From: "Nathaniel Alfred" To: X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N The head of 2.1 contains a new WildcardMatcherHelper [1] to replace the rather obscure WildcardHelper [2] implementation. WMH is now used for matching wildcard patterns in map:match. =20 Although the code is a lot clearer than WH, it is still very complex logic. A number of bugs in the original WMH code have been fixed in the meantime, but a few more seem to be lurking.. I recently fixed two bugs but now I am facing yet another one. This time it is a false positive where "*" matches what should be matched only by "**". Rather than submerging myself into the WMH code for fixing it I am inclined to rewrite the stuff one more time. Along the lines already discussed in the thread following [1] I would use the regexp library to do the heavy lifting. Since map:match is the most frequently executed pipeline instruction, speed is an issue. That can be mastered by a) caching the compiled regexps and b) handling the simple pattern with a single * or ** as special cases without using regexps. At the same time regexps would also remove the known limitation that "**/*/*" cannot match because "**" is over-greedy in the current WMH implementation. WDYT? Cheers, Alfred. [1] = http://marc.theaimsgroup.com/?l=3Dxml-cocoon-dev&m=3D115096562921641&w=3D= 2 [2] = http://marc.theaimsgroup.com/?l=3Dxml-cocoon-dev&m=3D114915395328845&w=3D= 2 =20 =20 This message is for the named person's use only. It may contain = confidential, proprietary or legally privileged information. No = confidentiality or privilege is waived or lost by any mistransmission. = If you receive this message in error, please notify the sender urgently = and then immediately delete the message and any copies of it from your = system. Please also immediately destroy any hardcopies of the message. = You must not, directly or indirectly, use, disclose, distribute, print, = or copy any part of this message if you are not the intended recipient. = The sender's company reserves the right to monitor all e-mail = communications through their networks. Any views expressed in this = message are those of the individual sender, except where the message = states otherwise and the sender is authorised to state them to be the = views of the sender's company.