AdvancedXPathExtractor

This is a more advanced version of the XPathExtractor bean which supports XPath functions.

AdvancedXPathExtractor bean attributes

An AdvancedXPathExtractor is created using a Spring bean with the following attributes:

Attribute Value Description
id User-defined A unique ID for the bean.
parent rdf.extractor.advanced.xpath.abstract The parent bean.

AdvancedXPathExtractor bean properties

The AdvancedXPathExtractor bean takes the following properties:

Property Type Mandatory Description
xmlSchemaFilter XmlSchemaFilter Required A filter for which the bean applies.
xpathQueries Map <QName,String> Required Map defining the XPath expressions to used for each predicate. Use a fully-qualified name with Clark notation as the key of the entry.

AdvancedXPathExtractor bean example

<bean id="my.custom.advanced.xpath.extractor" parent="rdf.extractor.advanced.xpath.abstract">
    <property name="xmlSchemaFilter" ref="dita.schemas.topic"/>
    <property name="xpathQueries">
      <map>
        <entry key-ref="qname.dita.title" value="string-join(/*/title/normalize-space(.),'')"/>
        <entry key-ref="qname.dita.shortdesc" value="normalize-space(string-join(/*/shortdesc/node(),''))"/>
      </map>
    </property>
  </bean>

Debugging

To debug your AdvancedXPathExtractor, add the following entry to your log4j.properties file:

log4j.logger.com.componize.rdf.pipeline.stax.AdvancedXPathExtractorFactory=trace