Creating Custom XPath Functions with Multiple Java Classes

You can also create custom XPath functions with multiple Java classes within the same plug-in.

Before you begin Create the custom XPath function in the plug-in. For more information, see Creating Custom XPath Functions.
    Procedure
  1. Create different classes in the same plug-in.

  2. Update the category, prefix, and namespace for the newly created Java class as per requirement. For example:

    @XPathFunctionGroup(category = "Another Custom Function",
    prefix = "mytns2",namespace = "http://my.xpath2", helpText = "Another Custom defined function")

  3. Navigate to plugin.xml and add custom XPath extensions on the Extensions tab.

  4. To update the class name and id, on the Extension Element Details pane click Browse.

  5. Create OSGi component for the newly created class as follows.

    1. Create a copy of the existing cxf.xml.

    2. For the newly created XML file, on the Overview tab of the Component pane, update Name, Factory ID, and Class fields .

  6. Repeat steps 3, 4, and 5 for other classes in the same plug-in.

  7. Update the manifest file to include the OSGI-INF/cxf.xml, OSGI-INF/foo_cxf.xml, and OSGI-INF/next_cxf.xml service components.

  8. Export the plug-ins and install into the host repository.

  9. Restart TIBCO Business Studio for BusinessWorks.

ResultThe new XPath functions are available for use.
What to do nextRun the application and custom XPath functions execute from the same plug-in.