Subject:XSL to XSL Mapping using custom Java functions Author:Selvakumar Krishnan Date:30 Oct 2007 06:44 AM
I am trying to create a xsl for transforming xml corresponding to source xsd to target xsd using Xalan. I have a set of java classes to process the data from source xml. In the mapper tabbed pane, after I right click and register the classes, I coudn't locate the java functions defined in the java classes.
Like to know how to use java functions in drag drop based xsl mapping.
Subject:XSL to XSL Mapping using custom Java functions Author:(Deleted User) Date:31 Oct 2007 03:48 PM
Hi,
when you say that you cannot locate the classes, are you referring to the dialog labeled "Java Class Browser"? (btw, which version of Stylus are you using?)
In this case, you should first add the location of your custom classes to the project classpath, by right clicking on the root node of the project tree and selecting the "Set Project Classpath" menu entry, and adding the JAR or the directory where the compiled classes are located.
Subject:XSL to XSL Mapping using custom Java functions Author:Selvakumar Krishnan Date:01 Nov 2007 05:12 AM
Usinging Stylus Studio XML Enterprise Suite 2007 release 2
I have the classes directory in project class path. Not sure if I need to have them as jar. I just have them as extracted class under a package.
For example, my class location is \\JavaSource\some\ContentHandler.class
My class fully qualified name is some.ContentHandler
I have the class path in project as \\JavaSource
I am able to locate the classes in Java Class Browser. After selecting my class, I don't know how to call its function in xsl. Please explain me what would be the next step.
Also I have attached a screenshot.
Please share any help docs if u have in addition to the product help.
Subject:XSL to XSL Mapping using custom Java functions Author:(Deleted User) Date:09 Nov 2007 05:56 AM
Hi,
once you have registered the function, you should see them listed in the same "Java Functions" submenu where you found the "Register Java Extension Class". If they still don't appear, it could be that their signature is not compatible with an extension class (as they have parameters different from String, Double/double, Boolean/boolean, NodeList, DocumentFragment, or return something different from Object)