You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Fleischer Roman <ro...@siemens.com> on 2003/12/10 14:57:45 UTC

RE: not allowed in this position in the styleshe et

The right way to show this is:

<xsl:template ...>
<html>
	<head>
		<title></title>
	</head>
	<body>
		<xsl:attribute name="bgcolor"><session:getxml
context="usrstuff" path="/fname"/></xsl:attribute>
	</body>
</html>

After this xslt-transformer you have to add a session-transformer to the
sitemap-matcher like this:
<map:transform type="xslt" src="your_sheet.xsl"/>
<map:transform type="session"/>

This works for me
Regards
Roman

-----Original Message-----
From: Stephanie Zohner [mailto:stephanie.zohner@gmx.at]
Sent: Mittwoch, 10. Dezember 2003 14:49
To: users@cocoon.apache.org
Subject: Re: <session:getxml> not allowed in this position in the
stylesheet


Have you tried this:

<xsl:template ...>
<xsl:variable name="bgcolor">
<xsl:value-of select="name"></xsl:value-of>
</xsl:variable>
<html>
	<head>
		<title></title>
	</head>
	<body bgcolor="{$bgcolor}"></body>
</html>

</xsl:template>

Regards,

Stephanie


> Hi Julien,
> 
> Thanks for your response. 
> 
> I have the session namespace declared in my
> stylesheet,  and a simple request will work. For
> example:
> 
> <name>
>  <session:getxml context="usrstuff" path="/fname"/>
> </name>
> 
> works fine. But if I want to have the background color
> of an html page to be retrieved from the session and
> placed in a body tag, I can't get it to work.
> 
> <html>
>  <body bgcolor="X"> (where 'X' would come from
> session)
>  </body>
> </html>
> 
> I've tried xsl:variables, xsl:attributes with no
> success. 
> 
> Thanks again.
> --- julien bloit <Ju...@ircam.fr> wrote:
> > Hi Bruce,
> > 
> > You can use this tag in a <xsl:template> tag, as
> > long as the session
> > namespace is dclared in your xsl document.
> > 
> > Can you provide a sample of the xsl you have a
> > problem with?
> > 
> > 
> > ----- Original Message ----- 
> > From: "Bruce Perryman" <bp...@yahoo.com>
> > To: "cocoon" <us...@cocoon.apache.org>
> > Sent: Tuesday, December 09, 2003 2:46 PM
> > Subject: <session:getxml> not allowed in this
> > position in the stylesheet
> > 
> > 
> > > Hello,
> > >
> > > I want to use <session:getxml> to retrieve data
> > which
> > > has been stored in the session with
> > <session:setxml>
> > > and place it in an html page.
> > > Where are allowable positions for <session:getxml>
> > in
> > > an xsl stylesheet?
> > >
> > > Thanks.
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > New Yahoo! Photos - easier uploading and sharing.
> > > http://photos.yahoo.com/
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > users-unsubscribe@cocoon.apache.org
> > > For additional commands, e-mail:
> > users-help@cocoon.apache.org
> > >
> > >
> > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail:
> > users-help@cocoon.apache.org
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> New Yahoo! Photos - easier uploading and sharing.
> http://photos.yahoo.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 

-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net



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

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