[prev in list] [next in list] [prev in thread] [next in thread] 

List:       velocity-dev
Subject:    Re: DVSL element proccessing missorder
From:       "Geir Magnusson Jr." <geirm () adeptra ! com>
Date:       2003-01-22 19:42:56
[Download RAW message or body]


On Wednesday, January 22, 2003, at 12:52 PM, Nicolas PERIDONT wrote:

> Hi,
>
> I have get some trouble with the actual implementation of DVSL.
> It appears when you used mixed xml elements (elements and text) as son
> of a same element.
> Like in this exemple of xml file :
> <foo>a<bar value="1"/>b<bar value="2"/>c</foo>
> when you apply a dvsl template to a such xml file your element are
> process in a wrong order.
> it process the two bar elements first and only after it process the 
> text
> elements (a,b,c).
>

The problem is that document order of nodes isn't required to be 
preserved in xpath, amazingly.  You can run into the same problems in 
XSLT.

As for the patch :

1) We depend upon dom4j for our xpath support, so I would ensure that 
you have the latest version of that before we try to fix it in DVSL.

2) it only solves the problem for applyTemplates(), not 
applyTemplates(String xpath), which I think we should do.  Thus, I 
think we need a more general solution.

If you could try the latest dom4j and report back, that would be great. 
  We can proceed from there.

geir


-- 
Geir Magnusson Jr                                   203-355-2219(w)
Adeptra, Inc.                                       203-247-1713(m)
geirm@adeptra.com


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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic