cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Bearce <...@bearce.us>
Subject Re: xsp:attribute generating a new element instead of an attribute in an already existing element
Date Tue, 31 Dec 2002 01:14:10 GMT
I believe you would have to do it this way:

<dates>
    <xsp:attribute 
name="current"><xsp:expr>currentDate</xsp:expr></xsp:attribute>
    <xsp:logic>
        while(rsDates.next()) {
            <data_sel><xsp:expr>rsDates.getString(1)</xsp:expr></date_sel>
        }
    </xsp:logic>
</dates>

Luís Góis wrote:

> Could you comment the behaviour below :
>  
>
> XSP :
> ===
> <dates>
>  <xsp:logic>
>   while(rsDates.next()) {
>    <date_sel><xsp:expr>rsDates.getString(1)</xsp:expr></date_sel>
>   }
>   <xsp:attribute 
> name="current"><xsp:expr>currentDate</xsp:expr></xsp:attribute>
>  </xsp:logic>
> </dates>
>
> generated XML :
> =============
> <dates>
>   <date_sel>27-12-2002</date_sel>
>   <date_sel>24-12-2002</date_sel>
>   <dates current="30-12-2002"> </dates>
> </dates>
> expected XML :
> =========
> <dates current="30-12-2002"> 
>   <date_sel>27-12-2002</date_sel>
>   <date_sel>24-12-2002</date_sel>
> </dates>
>  
>  
>  
> TIA
> Luís Góis



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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


Mime
View raw message