[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl]
Re: [xsl]
Subject: Re: [xsl] <xsl:for-each select="$myvar"> From: David Carlisle <davidc@xxxxxxxxx> Date: Wed, 19 Jun 2002 16:02:39 +0100 |
> <xsl:param name="myvar"/> That is special cased to set myvar to be an empty string. the on the command line you probably go myvar=DEC and that (in most XSLT systems) sets myvar to be the string 'DEC' so going <xsl:for-each select="$myvar" is equivalent to going <xsl:for-each select="'DEC'" and gets the same error message as you can't for-each over a string. Some XSLT systems let you pass in node sets as parameters, in which case you'd want to set the default value to be <xsl:param name="myvar" select="/.."/> which is an empty node set, not an empty string and do whatever sytem specific calls you need to set the parameter to a node set outside the stylesheet. <xsl:for-each select="$myvar" would work. If you want to pass in a string though, do something lik <xsl:key name=manufacturer" match="item" use="manufacturer"/> <xsl:for-each select="key('manufacturer',$myvar)"> David _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] <xsl:for-each select="$my, William S. | Thread | Re: [xsl] <xsl:for-each select="$my, Jeni Tennison |
Re: [xsl] Hello World, James Fuller | Date | RE: [xsl] <xsl:for-each select="$my, Andrew Welch |
Month |
Keywords