Creating Custom XPath Functions with Multiple Java Classes

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

Before you begin Create a custom XPath function. For more information see, see Creating Custom XPath Functions.
    Procedure
  1. Create different classes in the same plug-in.
  2. Update the category, prefix and namespace 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 customXpath extensions
  4. Update the class name and id.

  5. Create OSGi component for the newly created class.

  6. Create a copy of cxf.xml at the same location and provide some new name to the .xml file.

  7. Update the Name, Factory ID, and Class fields on the Component pane of the Overview tab.

  8. Repeat steps 5, 6, and 7 for other classes in the same plug-in.

  9. Update the manifest file to include

    Service-Component: OSGI-INF/cxf.xml, OSGI-INF/foo_cxf.xml, OSGI-INF/next_cxf.xml

  10. Export the plug-in and install into the host repository.

  11. Restart TIBCO Business Studio for BusinessWorks.

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