Subject: [xsl] xsl extension functions with Java Vectors and Xalan|
Date: Wed, 17 May 2006 08:41:50 +0100
I have written some extension functions for an xsl style sheet These are writtin in Java One function takes a NodeList from the style sheet and does a bit of messing around with databases and external tools and returns a Vector of objects of a class that is defined inside the interface class. The Methods are static methods on the class and the class is defined as a namespace Another template is used to interrogate each object in the vector and build up the output accordinglu. It does this via a <xsl:for-each select="mynamespace:my-function( node ) > <xsl:call-template name="xxxxxxxxxx"> <xsl:with-param name="abc" select="."/> </xsl </xsl <xsl:template name="xxxxxxxxxx"> <xsl:param name="abc"/> <xsl:element name="Item" use-attribute-sets="Detail"> <xsl:attribute name="yyy"> <xsl:value-of select="mynamespace:my-second-function($abc)"/> </xsl:attribute> my-function takes a NodeSet and returns a Vector of items my-second-funcction takes an item and returns a String This all worked straight away using Saxon 8 xslt version 2. You'd think that was enough but some people here think Xalan is a better standard, and for the life of me I cant get it to work with Xalan. The interface with strings and NodeSet all works fine and I can return the Vector into a variable but I have totally failed to process the elements of the vector. The error message I get is "SystemId Unknown; Line #0; Column #0; Can not convert #UNKNOWN (java.util.Vector) to a NodeList!" All suggestions (yes all) gratefully received M Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments.
|<- Previous||Index||Next ->|
|Re: [xsl] XSLT with PHP, Jon Gorman||Thread||[xsl] Fixed value only once in tabl, Mattias Pirmann|
|Re: [xsl] Need help for XSL beautif, George Cristian Bina||Date||[xsl] Fixed value only once in tabl, Mattias Pirmann|