The action doesn't return xml, it returns a string in its map. The
subsequent transformer then treats it as a string not xml. 

To output xml to be used by a transformer you need to use an existing
generator, or create your own to do what you require. To start with, have a
look at SessionAttributeGenerator.

Nick Frangos


-----Original Message-----
From: Moser, Martin (Bbn) [mailto:[EMAIL PROTECTED] 
Sent: Friday, 10 December 2004 2:38 AM
To: [EMAIL PROTECTED]
Subject: Cocoon-Actions returning xm


Hi all,

I am using cocoon 2.0.4 and have some troubles with the return values of my
actions.

The action returns a string, containing xml. This xml should be parsed in an
xsl sheet, which is revieving the return value of this action. But I am not
able to access the xml tags in the style sheet.

Here is a sample code of the action:
                :
        String str = "<test>text</test>";
        map.put("MSG", str);
        return (map);

The code in the according style sheet:
        <xsl:param name="MSG"/>
        :
        <tr><td> <xsl:value-of select="$MSG"/> </td></tr>
        :

Now the browser is printing: "<test>text</test>"
If I have a look at the source of this html, via "View source Code" from the
browser, I can see that the '<' and '>' signs are replaced by '&gt' and
'&lt'.

But I want to have '<' and '>'  and not '&lt' or '&gt'. 
Is there any special way to configure actions to make them returning xml?

Thanks in advance!

Regards,
Martin



---------------------------------------------------------------------
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]

Reply via email to