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.

Bug 129256 - Can't read classes from library jar
Summary: Can't read classes from library jar
Status: NEW
Alias: None
Product: xml
Classification: Unclassified
Component: XSL (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-05 10:27 UTC by kitfox
Modified: 2013-04-05 14:06 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kitfox 2008-03-05 10:27:42 UTC
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.
Comment 1 kitfox 2008-03-05 10:29:11 UTC
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?
Comment 2 Sergey Lunegov 2008-03-18 09:07:45 UTC
Most probably will not fix in this release. XSLT editor will be changed significantly in the next release.
Comment 3 Svata Dedic 2013-04-05 14:06:39 UTC
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.