This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I've written some classes which I'd like to use to provide input to some XSLT transformations. While I can use XSLT namespaces to call methods in tjee SDK's java.* or even included libraries such as JAXB, I do not seem to be able to create new instances of objects in jars I've created myself and added to my project's libraray. Attempts to apply the transform by right clicking on the xsl and xml files in the Projects window and selecting XML transformation fail. Attempting to validate the XSLT also fails with a message saying that it cannot find the class I'm referring to. My XSLT looks like: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ws='http://www.kitfox.com/schema/puzzle' xmlns:java="java" xmlns:puz="com.kitfox.puzzle" version="1.0"> <xsl:output method="xml" media-type="text/svg" indent="yes"/> <xsl:template match="ws:puzzle"> <svg:svg> <xsl:attribute name="date"> <xsl:value-of select="java:util.Date.new()"/> </xsl:attribute> <xsl:attribute name="myAttr"> <xsl:value-of select="puz:SimpleObj.new()"/> </xsl:attribute> the error message I get when validating is below. I am certain this class exists in this package in the jar in my library: XML validation started. Checking file:/C:/dev/myPath/formatter.xsl... Cannot find class 'com.kitfox.puzzle.SimpleObj'. Cannot find external constructor 'com.kitfox.puzzle.SimpleObj'. Could not compile stylesheet Could not compile stylesheet XML validation finished.
Forgot to ask: is there a way to call my custom objects from inside an XSLT via the IDE? Or at least get validation to work properly?
Most probably will not fix in this release. XSLT editor will be changed significantly in the next release.
Seems a valid enhancement. If the custom library is a part of the project, would require interaction with the compiler to bring the project up-to-date. Prepared JARs could be configured -> requires an additional UI. Should be more demanded or at least voted for.