Did you already figure out the fix to this problem?
Looking at your code, it seems to me that merkmal2 is defined in every context where it's accessed. Maybe if you look at the full generated Java code for this XSP page, you can determine why it cannot be resolved.

The generated Java code is usually in a place like
C:\Program Files\Apache Group\Tomcat 5.5\work\Catalina\localhost\_\cocoon-files\org\apache\cocoon\www\mount\gem\error_xsp.java
(for an xsp page at cocoon\build\webapp\mount\gem\error.xsp).

Regards,
Lars

Christian Barth wrote:
Hi! I get an Error, that "merkmal2" cannot be resolved. Why?

<xsp:logic>
        Set keys = gewichte.keySet();
        Iterator key_iter = keys.iterator();
        int index = 0;
        while (key_iter.hasNext()) {
                String merkmal = (String) key_iter.next();
                index++;
                <zeile>
                        <spalte>
                                <feld typ="text" weite="25%" >
                                        <xsp:attribute
name="value"><xsp:expr>gewichte.get(merkmal)</xsp:expr></xsp:attribute>
                                        <xsp:attribute
name="name"><xsp:expr>merkmal</xsp:expr></xsp:attribute>         
                                        <xsp:attribute
name="beschreibung"><xsp:expr>merkmal</xsp:expr></xsp:attribute>
                                </feld>
                        </spalte>
                if (key_iter.hasNext()) {
                        String merkmal2 = (String) key_iter.next();
                        <spalte>
                                <feld typ="text" weite="25%" >
                                        <xsp:attribute
name="value"><xsp:expr>gewichte.get(merkmal2)</xsp:expr></xsp:attribute>
                                        <xsp:attribute
name="name"><xsp:expr>merkmal2</xsp:expr></xsp:attribute>                
                                        <xsp:attribute
name="beschreibung"><xsp:expr>merkmal2</xsp:expr></xsp:attribute>
                                </feld>
                        </spalte>
                }
                </zeile>  
        }
</xsp:logic>      


Greets, Barthi

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]