Subject: Re: [xsl] using mode-values within a template From: Oleg Tkachenko <olegt@xxxxxxxxxxxxx> Date: Thu, 02 May 2002 16:02:34 +0200 |
thanks for your suggestion to do this by hard-coding the mode name into the templates as a variable likeYou know, it's kind of reflection, you want to know method signature in the method code, that's why it's not so elegant.
<xsl:template match="foo" mode="bar"> <xsl:variable name="mode" select="'bar'"/>
It's not the most elegant way but it works!
1. How can I select all nodes of a certain type except the one that is used at the moment??<xsl:for-each select="//project[count(.|current())!=1]">
e.g.:
<xsl:for-each select="//project">
<a href="{normalize-space(translate(@name,' ',''))}{@version}_cp.html">
<xsl:value-of select="@name"/>
<xsl:value-of select="@version"/>
</a>
     
</xsl:for-each>
Oh, that's better, try
I want to create a link for each project in the xml-source except the project I'm currently expanding...maybe it gets simpler, when I tell you, that all the projects are siblings....but I haven't read anything about a general element siblings (only preceding- and following-siblings) in xpath!!
<docu kind="url" loc="internet">
www.gcc.com
</docu>
... my href has the following value:
http://%0A www.gcc.com%0A/
Does anybody know, what I can make better to avoid this rubbish result???
-- Oleg Tkachenko Multiconn International, Israel
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] using mode-values within , David Carlisle | Thread | [xsl] Multiple requests with variab, Siarhei Biarozkin |
[xsl] selecting with text nodes, Ian Hord | Date | Re: [xsl] selecting with text nodes, David Carlisle |
Month |