Re: [xslt] xsl:param works only with numbers as content



On Thu, May 31, 2001 at 06:22:16PM +0200, Stephan Otte wrote:
> Hello,
> I have a problem with stylesheet-parameters whose content  are not numbers.
> The value of them in the result tree is empty!
> Stylesheet:
> ...
> <xsl:param name="user">nobody</xsl:param>
> 
> <xsl:template match="/">
> user: <xsl:value-of select="$user"/>
> ....
> 
> I pass the parameters with "xsltproc --param user stephan" or use the default in
> the
> stylesheet by omitting it in the command line, the result is the same.
> If the content is a number, everything works!
> 
> Any help?

  Classic XSLT stylesheet error

    select="foo" means the foo children of the current node
    select="'foo'" means the string "foo"

Same on the shell you need to use --param user "'stephan'"

Daniel
-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]