Class XsltSearchExport

java.lang.Object
io.goobi.viewer.model.export.XsltSearchExport

public final class XsltSearchExport extends Object
Applies a configurable XSLT stylesheet to Solr search results serialised as XML, producing output in formats such as RIS, Endnote XML, BibTeX, or any other XSLT-derivable format.

Stylesheets are resolved from the viewer config directory under <configFolder>/xsl/ (e.g. /opt/digiverso/viewer/config/xsl/).

  • Method Details

    • transform

      public static String transform(org.apache.solr.common.SolrDocumentList docs, String xsltFileName) throws TransformerException, ParserConfigurationException
      Transforms the given Solr documents through the named XSLT stylesheet.
      Parameters:
      docs - the Solr documents to transform
      xsltFileName - the name of the XSLT file (e.g. "solr2endnote.xsl")
      Returns:
      the transformed string output
      Throws:
      TransformerException - if the XSLT transformation fails
      ParserConfigurationException - if the XML document builder cannot be created