ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> xsl-list
xsl-list
Re: [xsl] Error xsl:param may not be used here
by Ryan Beesley other posts by this author
Oct 14 2002 2:37PM messages near this date
RE: [xsl] Error xsl:param may not be used here | Re: [xsl] Error xsl:param may not be used here
----- Original Message -----
From: "Andrew Welch" <awelch@[...].com> 
To: <xsl-list@[...].com> 
Sent: Monday, October 14, 2002 4:26 AM
Subject: RE: [xsl] Error xsl:param may not be used here


> 
>  ><xsl:when test="not(string-length($graph/@type) = 0)">
> 
>  Here you are treating the variable $graph as a nodeset, when it is only
>  a string.
> 
> 
>   <xsl:template name="drawGraph">
>    <xsl:variable name="graph" select="." />
>    <xsl:param name="type">
>     <xsl:choose>
>      <xsl:when test="not(string-length($graph/@type) = 0)">
>       <xsl:value-of select="$graph/@type" />
>      </xsl:when>
>      <xsl:otherwise>x-y</xsl:otherwise>
>     </xsl:choose>
>    </xsl:param>
>    <type>
>     <xsl:value-of select="$type"/>
>    </type>
>   </xsl:template>
> 
>  You can just drop $graph here and use @type on its own, as the current
>  node will always be '.'

This is true, but I designed it to allow the graph element to be nested
inside some other elements.  I think your right about it being unessicary,
but this way I know exactly what structure I'm looking at... it is something
I'll take into consideration.

Ryan Beesley
Rbeesley@[...].org
Founder, Atum Innovations



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
Thread:
Andrew Welch
Ryan Beesley

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved