note 62444 added to function.xsl-xsltprocessor-register-php-functions

From: Date: Tue, 28 Feb 2006 20:33:56 +0000
Subject: note 62444 added to function.xsl-xsltprocessor-register-php-functions
Groups: php.notes 
Request: Send a blank email to php-notes+get-104577@lists.php.net to get a copy of this message
Upon testing returning of a nodeset contributed by taylorbarstow at that google mail thingy (which works excellently, TY!) I found that with using: === "Presumably, it's worth creating a template to do the discard: <xsl:template select="*" mode="discardRoot"> <xsl:apply-templates select="./*" /> </xsl:template> Which you can call like so: <xsl:apply-templates select="php:function('getNodeSet')" mode="discardRoot" /> " === I could only output the text and not any of the tags after applying templates - i.e. it stripped all elements around text. Instead using: === <xsl:template match="/"> <xsl:for-each select="php:function('getNodeSet')" /> <xsl:apply-templates /> </xsl:for-each> </xsl:template> which effectively discards the root node. === Worked fine and allowed me to apply-templates without problem on the returned nodeset. ---- Server IP: 85.116.0.130 Probable Submitter: 212.56.100.162 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.xsl-xsltprocessor-register-php-functions.php Edit -- http://master.php.net/note/edit/62444 Del: integrated -- http://master.php.net/note/delete/62444/integrated Del: useless -- http://master.php.net/note/delete/62444/useless Del: bad code -- http://master.php.net/note/delete/62444/bad+code Del: spam -- http://master.php.net/note/delete/62444/spam Del: non-english -- http://master.php.net/note/delete/62444/non-english Del: in docs -- http://master.php.net/note/delete/62444/in+docs Del: other reasons-- http://master.php.net/note/delete/62444 Reject -- http://master.php.net/note/reject/62444 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#104577) next »