You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Barbara Post <ba...@ifrance.com> on 2002/08/20 14:52:29 UTC

xsl variable and sunshine getxml

c2.0.3..

I am surprised that :

<sunshine:getxml context="MyContext" path="/root/lkfmPageTitle"/> works
while :

<variable name="foo">
<sunshine:getxml context="MyContext" path="/root/lkfmPageTitle"/>
</variable>
<xsl:value-of select="$foo"/>

does not...

I need to pass the value to a template (of an imported reused
stylesheet...).

Thanks...

Babs


---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: xsl variable and sunshine getxml

Posted by Barbara Post <ba...@ifrance.com>.
yeah it was a typo in my mail but indeed I have xsl:variable in my xsl.
sorry..
----- Original Message -----
From: "KOZLOV Roman" <r-...@opencascade.com>
To: <co...@xml.apache.org>
Sent: Tuesday, August 20, 2002 3:03 PM
Subject: Re: xsl variable and sunshine getxml


> Why not xsl:variable?
>
> Roman
>
> Barbara Post wrote:
>
> > c2.0.3..
> >
> > I am surprised that :
> >
> > <sunshine:getxml context="MyContext" path="/root/lkfmPageTitle"/> works
> > while :
> >
> > <variable name="foo">
> > <sunshine:getxml context="MyContext" path="/root/lkfmPageTitle"/>
> > </variable>
> > <xsl:value-of select="$foo"/>
> >
> > does not...
> >
> > I need to pass the value to a template (of an imported reused
> > stylesheet...).
> >
> > Thanks...
> >
> > Babs
> >
> > ---------------------------------------------------------------------
> > 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:     <co...@xml.apache.org>
> > For additional commands, e-mail:   <co...@xml.apache.org>
>
>
> ---------------------------------------------------------------------
> 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:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>


---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: xsl variable and sunshine getxml

Posted by KOZLOV Roman <r-...@opencascade.com>.
Why not xsl:variable?

Roman

Barbara Post wrote:

> c2.0.3..
>
> I am surprised that :
>
> <sunshine:getxml context="MyContext" path="/root/lkfmPageTitle"/> works
> while :
>
> <variable name="foo">
> <sunshine:getxml context="MyContext" path="/root/lkfmPageTitle"/>
> </variable>
> <xsl:value-of select="$foo"/>
>
> does not...
>
> I need to pass the value to a template (of an imported reused
> stylesheet...).
>
> Thanks...
>
> Babs
>
> ---------------------------------------------------------------------
> 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:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>


---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: xsl variable and sunshine getxml

Posted by Joerg Heinicke <jo...@gmx.de>.
Hello Barbara,

that's a simple XSL problem.

With

 > <variable name="foo">
 > <sunshine:getxml context="MyContext" path="/root/lkfmPageTitle"/>
 > </variable>

you create a Result Tree Fragment (RTF), not a node set. A RTF contains the 
nodes, but you can't operate on them like on a node set. It behaves more 
like a string. But in your variable you have no text node, so there is no 
text to operate on. What you need is <xsl:copy-of select="$foo"/>.

There is only one problem: Which transformer is executed earlier?

Regards,

Joerg

Barbara Post wrote:
> c2.0.3..
> 
> I am surprised that :
> 
> <sunshine:getxml context="MyContext" path="/root/lkfmPageTitle"/> works
> while :
> 
> <variable name="foo">
> <sunshine:getxml context="MyContext" path="/root/lkfmPageTitle"/>
> </variable>
> <xsl:value-of select="$foo"/>
> 
> does not...
> 
> I need to pass the value to a template (of an imported reused
> stylesheet...).
> 
> Thanks...
> 
> Babs

-- 

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de


---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: xsl variable and sunshine getxml

Posted by Barbara Post <ba...@ifrance.com>.
thanks for the explaination Carsten. I finally palinly copied the needed
templates into my stylesheet, rather than writing more stylesheets ;-) as I
thought of too.

----- Original Message -----
From: "Carsten Ziegeler" <cz...@s-und-n.de>
To: <co...@xml.apache.org>
Sent: Tuesday, August 20, 2002 3:15 PM
Subject: RE: xsl variable and sunshine getxml


>
>
> > -----Original Message-----
> > From: Barbara Post [mailto:babs33@ifrance.com]
> > Sent: Tuesday, August 20, 2002 2:52 PM
> > To: cocoon-users@xml.apache.org
> > Subject: xsl variable and sunshine getxml
> >
> >
> > c2.0.3..
> >
> > I am surprised that :
> >
> > <sunshine:getxml context="MyContext" path="/root/lkfmPageTitle"/> works
> > while :
> >
> > <variable name="foo">
> > <sunshine:getxml context="MyContext" path="/root/lkfmPageTitle"/>
> > </variable>
> > <xsl:value-of select="$foo"/>
> >
> > does not...
> >
> sunshine:getxml is processed by the sunShine transformer and not the
> stylesheet.
> So at the time, the xsl:value-of is evaluated, the sunShine transformer
did
> not run, so the value-of is built over the element <sunshine:getxml>.
>
> One solution is to do a three stage processing:
> 1. A pipeline with a stylesheet followed by the sunshine transformer
>    followed by a stylesheet
> 2. Adding sunshine:getxml in the first stylesheet
> 3. the sunShine transformer replaces the element with the value
> 4. the second stylesheet can do a value-of
>
> HTH
> Carsten
>
> > I need to pass the value to a template (of an imported reused
> > stylesheet...).
> >
> > Thanks...
> >
> > Babs
> >
> >
> > ---------------------------------------------------------------------
> > 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:     <co...@xml.apache.org>
> > For additional commands, e-mail:   <co...@xml.apache.org>
> >
>
>
> ---------------------------------------------------------------------
> 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:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>


---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: xsl variable and sunshine getxml

Posted by Carsten Ziegeler <cz...@s-und-n.de>.

> -----Original Message-----
> From: Barbara Post [mailto:babs33@ifrance.com]
> Sent: Tuesday, August 20, 2002 2:52 PM
> To: cocoon-users@xml.apache.org
> Subject: xsl variable and sunshine getxml
>
>
> c2.0.3..
>
> I am surprised that :
>
> <sunshine:getxml context="MyContext" path="/root/lkfmPageTitle"/> works
> while :
>
> <variable name="foo">
> <sunshine:getxml context="MyContext" path="/root/lkfmPageTitle"/>
> </variable>
> <xsl:value-of select="$foo"/>
>
> does not...
>
sunshine:getxml is processed by the sunShine transformer and not the
stylesheet.
So at the time, the xsl:value-of is evaluated, the sunShine transformer did
not run, so the value-of is built over the element <sunshine:getxml>.

One solution is to do a three stage processing:
1. A pipeline with a stylesheet followed by the sunshine transformer
   followed by a stylesheet
2. Adding sunshine:getxml in the first stylesheet
3. the sunShine transformer replaces the element with the value
4. the second stylesheet can do a value-of

HTH
Carsten

> I need to pass the value to a template (of an imported reused
> stylesheet...).
>
> Thanks...
>
> Babs
>
>
> ---------------------------------------------------------------------
> 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:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>


---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>