Ignore:
Timestamp:
2002-10-11T13:37:05+13:00 (22 years ago)
Author:
kjdon
Message:

dynamically determined stylesheet inclusions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/action/PageAction.java

    r3441 r3455  
    1010
    1111import java.util.HashMap;
     12import java.io.File;
     13
    1214public class PageAction extends Action {
    1315
     
    5153    coll_list_message.appendChild(coll_list_request);
    5254    coll_list_request.setAttribute("type", "describe");
    53     coll_list_request.setAttribute("info", "collectionList");
     55    //coll_list_request.setAttribute("info", "collectionList");
    5456   
    5557    Element coll_list_response = (Element)mr_.process(coll_list_message);
     
    8385
    8486    String stylesheet = GSFile.stylesheetFile(config_, "home.xsl");
    85     String transformed_result = transformer_.transform(stylesheet,
    86                                page);   
    87     return transformed_result;
     87    Document style_doc = converter_.getDOM(new File(stylesheet));
     88    GSXSLT.absoluteIncludePaths(style_doc, config_);
     89    return transformer_.transform(style_doc, page);   
     90   
    8891             
    8992    } // homePage
     
    111114    // process using the stylesheet
    112115    String stylesheet = GSFile.stylesheetFile(config_, "about.xsl");
     116    Document style_doc = converter_.getDOM(new File(stylesheet));
     117    GSXSLT.absoluteIncludePaths(style_doc, config_);
     118    return transformer_.transform(style_doc, page);   
    113119
    114     //System.out.println("response="+converter_.getString(page));
    115     String transformed_result = transformer_.transform(stylesheet,
    116                                page);   
    117     return transformed_result;
    118    
    119120   
    120121    }
Note: See TracChangeset for help on using the changeset viewer.