cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Portier <...@outerthought.org>
Subject Re: Woody Binding Selecting Rows
Date Tue, 02 Dec 2003 08:53:03 GMT
Jan,

could you slide in the error you got?

things that come to mind (possible reasons why it goes wrong)
- jxpath fails on a setValue call with an xpath statement that contains 
a predicate (anyone that tested this on bare jxpath?)

even if that would work:
- the repeater-binding produces an additional row-index predicate for 
the setValue on the newly to be created node.  It just appends the 
[rowindex] but if there is already a predicate present then the syntax 
should be more like [(part that is there) and position()=new_rowindex]

actually the easiest way seems to be to remove the predicate from the 
statement just before doing the insert-phaze of the binding, ie. 
starting with counting how many rows there are left after delete (that 
count should also be regardless of predicates, so the additions get 
inserted at the end...)


hm, still in thinking and considering mode
wdot?

regards,
-marc=


Jan Hoskens wrote:

> Hi,
> 
>  
> 
> I’m trying to use Woody Binding on my XML document (movie database). I’m 
> keeping  my deleted rows in my document (for further use) and thus use 
> the <wb:set-attribute> tag to do this. When I bind the XML document, I 
> do not wish to see the rows that are deleted so I use:
> 
>  
> 
> <wb:repeater id="movies" parent-path="movies"
> 
>                         row-path="movie[@deleted = 'false']"
> 
>                         unique-row-id="id"
> 
>                         unique-path="@id"
> 
>                         >
> 
>  
> 
> Everything’s fine just as long as I don’t add a row. If I do try to add 
> a row, I get an error while trying to save the form (I use Apples and 
> call saveFormToModel()).
> 
> The error that I get concerns the JXPath. I’m guessing that I cannot use 
> an expression instead of a path in my row-path? Is there another way to 
> select only my @deleted=’false’ rows from my XML document?
> 
>  
> 
> Thanx
> 
> Bye,
> 
>  
> 
> JH
> 

-- 
Marc Portier                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                http://blogs.cocoondev.org/mpo/
mpo@outerthought.org                              mpo@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message