Project

General

Profile

« Previous | Next » 

Revision 3007

Added by Duane Costa over 18 years ago

Add qformat parameter to resultsetToHTML() method. Set the qformat paramater in the transformer if it is specified.

View differences:

src/edu/ucsb/nceas/metacat/advancedsearch/Stylizer.java
47 47
   * @param resultset       the pathquery result string from Metacat
48 48
   * @param sessionId       the user's session id
49 49
   * @param metacatURL      the URL to the Metacat server
50
   * @param qformat         The qformat (skin) to use when displaying results.
51
   * @param xslPath         File path to the resultset.xsl stylesheet.
50 52
   * 
51 53
   * @return htmlString     the result of the transformation from XML to HTML
52 54
   */
53 55
  public String resultsetToHTML(final String resultset, 
54 56
                                final String sessionId,
55 57
                                final String metacatURL,
58
                                final String qformat,
56 59
                                final String xslPath) {
57 60
    String htmlString = "";
58 61
    Result result;
......
75 78
      transformer = transformerFactory.newTransformer(xsltSource);
76 79
      transformer.setParameter("sessid", sessionId);
77 80
      transformer.setParameter("metacatURL", metacatURL);
81
      
82
      if ((qformat != null) && (!qformat.equals(""))) {
83
        transformer.setParameter("qformat", qformat);
84
      }
85
      
78 86
      transformer.transform(xmlSource, result);
79 87
      htmlString = stringWriter.toString();
80 88
    }

Also available in: Unified diff