 | Plugin Availability
The XPath and XPath Search plugins are available in the blojsom add-on bundle. This is a separate download from the blojsom.war file. |
Description
The XPath and XPathSearch plugin allow you to search your blog using XPath queries. The XPath plugin differs from the XPathSearch plugin in that a different URL parameter is used for the XPathSearch plugin. The XPath Search plugin is an extension of the Simple Search plugin in that if a query starts with a leading '/', then the plugin assumes an XPath syntax is being used, otherwise the search is handled by the Simple Search plugin.
Installation and Setup
After downloading the blojsom add-on bundle, copy the blojsom-addon-plugins-{version}.jar and commons-jxpath-1.1 file into your /WEB-INF/lib directory.
In your /WEB-INF/classes/blojsom-plugins.xml file, add the following:
<bean id="xpath" class="org.blojsom.plugin.xpath.XPathPlugin" init-method="init" destroy-method="destroy"/>
<bean id="xpath-search" class="org.blojsom.plugin.xpath.XPathSearchPlugin" init-method="init" destroy-method="destroy"/>
You may then add "xpath" or "xpath-search" to one of the flavor-based plugin chains. If you are using the XPath Search plugin to replace the Simple Search plugin, then replace the Simple Search plugin short name (usually "simple-search) with the XPath Search plugin short name.
Usage and URL Parameters
URL parameters
The following table describes the URL parameters that affect the output of the XPath and XPath Search plugin.
| URL parameter |
Accepted values |
Usage |
| xpath |
XPath query |
Used to search blog entries if using the XPath plugin. |
| query |
XPath query |
Same as the Simple Search plugin if using the XPath Search plugin. |