Re: XSL Extension

From: Date: Fri, 16 Apr 2004 13:58:08 +0000
Subject: Re: XSL Extension
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-9254@lists.php.net to get a copy of this message
On Fri, 16 Apr 2004, Kenneth Schwartz wrote: > Examples: > <xsl:value-of select="php:function('date', 'r')"/> > Outputs the RFC formatted date (current date/time) > > <xsl:value-of select="php:functionString('date', 'r', > date)"/> > Outputs the RFC formatted date of the <date> element as the unix > timestamp > > I just wanted to be sure of what I've gathered from testing and the > source that the usage of both functions is correct. Any other > information would be appreciated. Yes. This is correct. php:functionString() allows you to pass arbitrary elements to a function. This can be a text node, (as in your example above), or even an entire set of element nodes. For example: <xsl:value-of select="php:functionString('myDate', //date")/> myDate is some userland function that iterates through an array of //date nodes using DOM, does something on them, and returns a value. If I was more awake, I'd give you a better example, but you get the picture. -adam -- adam@trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today!

« previous php.internals (#9254) next »