DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13535>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13535 Cannot access any attributes, if node is returned from extension funct�on Summary: Cannot access any attributes, if node is returned from extension funct�on Product: XalanJ2 Version: 2.3 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: org.apache.xalan.extensions AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I am calling an extension function as follows: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xslt="http://xml.apache.org/xslt" xmlns:ext="org.apache.xalan.xslt.extensions.SubModuleImpl" xmlns:xalan="http://xml.apache.org/xalan" extension-element-prefixes="ext" version="1.0"> <xsl:template match="/"> <foo> <xsl:variable name="content"> <ext:anymethod descriptor="xyz" url="'http://www.foo.fo'"/> </xsl:variable> <xsl:variable name="test" select="xalan:nodeset($content)"/> <xsl:apply-templates select="$test/*" /> </foo> </xsl:template> <xsl:template match="test"> <xsl:copy> <xsl:for-each select="@*"> <xsl:copy /> </xsl:for-each> </xsl:copy> </xsl:template> </xsl:stylesheet> The relevant corresponding javacode looks like: public class SubModuleImpl { public SubModuleImpl () {} public Node anymethod (XSLProcessorContext context, ElemExtensionCall extElem) { try { StringReader reader = new StringReader("<test color=\"blue\" />"); InputSource is = new InputSource(reader); DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance(); dfactory.setNamespaceAware(true); DocumentBuilder builder = dfactory.newDocumentBuilder(); Document doc = builder.parse(is); return doc; } catch (Exception e) { e.printStackTrace(); } return null; } } Effect: The colour attribute is not copied !!!
