velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <ge...@optonline.net>
Subject Re: [DVSL] #match and unions fail?
Date Thu, 07 Mar 2002 01:01:20 GMT
On 3/6/02 7:55 PM, "Bill Burton" <billb@progress.com> wrote:

> Hello,
> 
> Just for the record, if anyone runs into this issue, there's a bug in
> jaxen utilized by dom4j-1.1.1 included with DVSL 0.42 and with the current
> dom4j-1.2.  The fix is to patch org.jaxen.pattern.UnionPattern as follows:
> 
> --- org/jaxen/pattern/UnionPattern.java.orig    Wed Aug  8 17:29:49 2001
> +++ org/jaxen/pattern/UnionPattern.java Wed Mar  6 01:39:51 2002
> @@ -91,7 +91,7 @@
>    public Pattern simplify()
>    {
>        this.lhs = lhs.simplify();
> -        this.rhs = lhs.simplify();
> +        this.rhs = rhs.simplify();
>        init();
>        return this;
>    }
> 
> Thanks Bob for the pointer to jaxen.

There was another bug that James fixed - so I will have a fixed dom4j jar in
CVS later tonight if consciousness persists...

:)

> 
> -Bill
> 
> Bill Burton wrote:
>> 
>> Hello,
>> 
>> I'm attempting to use the #match directive with unions to match one node
>> or another:
>>     #match( "aaa | bbb" )
>> What I'm finding is it matches "aaa" nodes but not "bbb" nodes.
>> 
>> The real easy way to reproduce this is to modify
>> examples/simple/docs/example1.dvsl changing:
>>     #match("document")
>> to
>>     #match("aaa | document")
>> it will then fail to match on "document" and not output the <html>
>> section.  However, changing it to:
>>     #match("document | aaa")
>> does work.
>> 
>> I'm assuming this is really a dom4j issue so I upgraded to version 1.2 but
>> this hasn't helped.  I'm attempting to reproduce this using the dom4j
>> API's.  In the meantime, I'm open to suggestions.
>> 
>> -Bill
> 
> --
> To unsubscribe, e-mail:
> <mailto:velocity-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:velocity-user-help@jakarta.apache.org>
> 

-- 
Geir Magnusson Jr.                                     geirm@optonline.net
System and Software Consulting
The bytecodes are language independent. - Sam Ruby  


--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message