Hi

I'm passing a NodeList to an extension like this:

        <xsl:variable name="notesNode" select="Notes"/>
        <xsl:value-of select="java:X_RenderNotesInBrowser.get($notesNode)"/>

The signature of the method in my extension is this:

        public static String get( NodeList nList )

And I know it is receiving the nodelist, because i can do 
nList.item(0).getNodeName()

However, there seems to be something wrong with the nodes I'm getting 
because an error is thrown from 
org.apache.xml.utils.UnImplNode.getAttributeNode when i cast them to 
Element and try getAttributeNode().  PLs see stacktrace below.

Any ideas what might be wrong? I get the same behaviour in Xalan 2.1 and 
earlier 2.x.

thanks

Jason

----------------


java.lang.RuntimeException: Function not supported!
        at org.apache.xml.utils.UnImplNode.error(UnImplNode.java:87)
        at org.apache.xml.utils.UnImplNode.getAttributeNode(UnImplNode.java:378)
        at com.us.NoteImpl.<init>(NoteImpl.java:57)
        at com.us.Notes.<init>(Notes.java:44)
        at X_RenderNotesInBrowser.get(X_RenderNotesInBrowser.java:23)
        at java.lang.reflect.Method.invoke(Native Method)
        at 
org.apache.xalan.extensions.ExtensionHandlerJavaPackage.callFunction(ExtensionHandlerJavaPackage.java:334)
        at 
org.apache.xalan.extensions.ExtensionsTable.extFunction(ExtensionsTable.java:253)
        at 
org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunction.java:141)
        at org.apache.xpath.XPath.execute(XPath.java:260)
        at org.apache.xalan.templates.ElemValueOf.execute(ElemValueOf.java:251)
        at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2251)
        at org.apache.xalan.templates.ElemIf.execute(ElemIf.java:166)
        at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2251)
        at 
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:637)
        at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2251)
        at 
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:637)

Reply via email to