You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Elmar Christen <el...@elmartec.de> on 2001/04/17 10:29:11 UTC
xsl:value-of select="$anXPathString"
Hi there!
I am doing this odd thing with XSPs, and I need something like:
<xsl:variable name="refname">
<xsl:value-of select="ref"/>
<xsl:variable>
<xsl:value-of>
<xsl:value-of select="$refname"/>
</xsl:value-of>
Ok, I know, there is not such a construct, it it just an example of what
I need. The problem is: in my XML I have an attribute, which value
happens to be a XPath to an elemenyt whithin the same XML doc. Example:
<root>
<names><elmar>Christen</elmar></names>
<bind id="mibind" ref="/root/names/elmar"/>
</root>
and the corresponding XSL fragment is:
<xsl:variable name="refname">
<xsl:value-of select="ref"/>
<xsl:variable>
Your name is:
<xsl:value-of>
<xsl:value-of select="$refname"/>
</xsl:value-of>
to get me a:
Your name is Christen
Is there a cool way to solve it with XSL or XSP? Currently, I am using
Cocoon 1.8.2.
Thank You!
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: xsl:value-of select="$anXPathString"
Posted by Frans Thamura <ft...@yahoo.com>.
I think the cocoon don't have this feature..or I don't
know how to used that... :)
I try several time, the variable cannot be changed,
but if you used xsl:choose/xsl:when, but after the
</xsp:choose>, the value back to the orginial value..
I used java to handle this.. <xsp:logic>
Strange solution yeah..
Frans
--- Elmar Christen <el...@elmartec.de> wrote:
> Hi there!
> I am doing this odd thing with XSPs, and I need
> something like:
> <xsl:variable name="refname">
> <xsl:value-of select="ref"/>
> <xsl:variable>
> <xsl:value-of>
> <xsl:value-of select="$refname"/>
> </xsl:value-of>
>
> Ok, I know, there is not such a construct, it it
> just an example of what
> I need. The problem is: in my XML I have an
> attribute, which value
> happens to be a XPath to an elemenyt whithin the
> same XML doc. Example:
> <root>
> <names><elmar>Christen</elmar></names>
> <bind id="mibind" ref="/root/names/elmar"/>
> </root>
>
> and the corresponding XSL fragment is:
> <xsl:variable name="refname">
> <xsl:value-of select="ref"/>
> <xsl:variable>
> Your name is:
> <xsl:value-of>
> <xsl:value-of select="$refname"/>
> </xsl:value-of>
>
> to get me a:
> Your name is Christen
>
> Is there a cool way to solve it with XSL or XSP?
> Currently, I am using
> Cocoon 1.8.2.
>
> Thank You!
>
>
>
---------------------------------------------------------------------
> Please check that your question has not already been
> answered in the
> FAQ before posting.
> <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail:
> <co...@xml.apache.org>
> For additional commands, e-mail:
> <co...@xml.apache.org>
>
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>