You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Robert Sösemann <ro...@gmx.de> on 2003/03/12 18:48:05 UTC

tag inside xsl:attribute's value

I have an applet which takes an xml fragment  as input, because it displays
document by reading the underlying xml document model.

I need to give this xml fragment to the applet by inserting it into an html
param tag like this.

<PARAM name="text" value="XMLSNIPPET"/>

Till now I did that inside an XSP with

<PARAM name="text">
    <xsp:attribute
name="value"><xsp:expr>contentObject.getXMLSnippet()</xsp:expr>xsl:attribute
>
</PARAM>

But now I need to do the same inside an XSL, and IT DOES NOT WORK. All
Tags/XML-Element are stripped out. Nothing left than plain Text.

Whats wrong here? Any idea?

Thanks in advance. Rob

............................................................................
 ROBERT SÖSEMANN  (robert.soesemann@web.de)

 schwärzlocherstr. 29/1 | 72070 tübingen
 tel : 07071 / 400 880


 icq# : 100 467 870
 pgp-keys : www.webspace-journey.de/pgp.asc
............................................................................


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


Re: tag inside xsl:attribute's value

Posted by Robert Sösemann <ro...@gmx.de>.
Hey Joerg,

actually we solved the problem by a dirty quickhack using base64 encoding of
the xml Fragment.
The problem was the following.

DB stores articles as xml fragment (kind of document model)
to make it editable in our CMS we use an wysiwyglike applet which displays
this article in its presentation form instead of xml.

Therefore we need to send this xml fragment (read out of db by Generator )
to an applet in our html page.
To produce this page we transform the generated xml by an xsl.

Thats where the xml fragment is passed to the applet like I mentioned
before.

Maybe you have a better solution. Otherwise thanks for your help, anyway.

Rob
----- Original Message -----
From: "Joerg Heinicke" <jo...@gmx.de>
To: <co...@xml.apache.org>
Sent: Wednesday, March 12, 2003 7:20 PM
Subject: Re: tag inside xsl:attribute's value


> Hi Robert,
>
> Robert Sösemann wrote:
> > I have an applet which takes an xml fragment  as input, because it
displays
> > document by reading the underlying xml document model.
> >
> > I need to give this xml fragment to the applet by inserting it into an
html
> > param tag like this.
> >
> > <PARAM name="text" value="XMLSNIPPET"/>
> >
> > Till now I did that inside an XSP with
> >
> > <PARAM name="text">
> >     <xsp:attribute
> >
name="value"><xsp:expr>contentObject.getXMLSnippet()</xsp:expr>xsl:attribute
> >
> > </PARAM>
> >
> > But now I need to do the same inside an XSL, and IT DOES NOT WORK. All
> > Tags/XML-Element are stripped out. Nothing left than plain Text.
> >
> > Whats wrong here? Any idea?
>
> that's correct behaviour. You can't store an XML snippet in an attribute
> or as an attribute's value. It's different in XSP, where the XML
> elements and so <xsp:attribute/> are converted into java first. Can you
> be a bit more specific what you want to reach. Bringing the XML fragment
> back to the client?
>
> Regards,
>
> Joerg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>


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


Re: tag inside xsl:attribute's value

Posted by Joerg Heinicke <jo...@gmx.de>.
Hi Robert,

Robert Sösemann wrote:
> I have an applet which takes an xml fragment  as input, because it displays
> document by reading the underlying xml document model.
> 
> I need to give this xml fragment to the applet by inserting it into an html
> param tag like this.
> 
> <PARAM name="text" value="XMLSNIPPET"/>
> 
> Till now I did that inside an XSP with
> 
> <PARAM name="text">
>     <xsp:attribute
> name="value"><xsp:expr>contentObject.getXMLSnippet()</xsp:expr>xsl:attribute
> 
> </PARAM>
> 
> But now I need to do the same inside an XSL, and IT DOES NOT WORK. All
> Tags/XML-Element are stripped out. Nothing left than plain Text.
> 
> Whats wrong here? Any idea?

that's correct behaviour. You can't store an XML snippet in an attribute 
or as an attribute's value. It's different in XSP, where the XML 
elements and so <xsp:attribute/> are converted into java first. Can you 
be a bit more specific what you want to reach. Bringing the XML fragment 
back to the client?

Regards,

Joerg


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