[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: kdenonbeta/unsermake
From:       Frans Englich <frans.englich () telia ! com>
Date:       2005-03-15 20:56:08
Message-ID: 200503152056.08614.frans.englich () telia ! com
[Download RAW message or body]

On Tuesday 15 March 2005 19:57, Frerich Raabe wrote:
> On Tuesday 15 March 2005 09:26, Stephan Kulow wrote:
> > don't use not existant features ;(
>
> I still don't know how to make it work, I have found only little
> information on that (passing parameters from libxslt to some stylesheet,
> and how to evaluate them there), and trial & error didn't get me any
> further either.

Do you mean passing parameters to the xslt engine via the C API or the Python 
bindings? Or via xmllint?

You can percept parameters to a stylesheet by first declaring a global 
parameter, child of xsl:stylesheet:

<xsl:param name="myParameter" select="'the default value is a string'"/>

After that you can refer to it as an XPath variable, $myParameter. For 
example, <xsl:value-of select="$myParameter"/>.

So this is about XSLT, not libxslt. For more info, see:
http://www.w3.org/TR/xslt.html#top-level-variables

How to pass parameters is implementation specific though. For the above 
example, it's done like this with xmllint:

xmllint --stringparam myParameter "quoted string value" --output output.xml 
stylesheet.xsl inputfile.xml

But you meant using the engine directly?
	

Cheers,

		Frans


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic