Changeset 16374 for greenstone3/trunk/src/java/org/greenstone/gsdl3/core/TransformingReceptionist.java
- Timestamp:
- 2008-07-14T12:10:15+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
greenstone3/trunk/src/java/org/greenstone/gsdl3/core/TransformingReceptionist.java
r13270 r16374 116 116 117 117 118 protected ElementpostProcessPage(Element page) {118 protected Node postProcessPage(Element page) { 119 119 120 120 // might need to add some data to the page 121 121 addExtraInfo(page); 122 122 // transform the page using xslt 123 Elementtransformed_page = transformPage(page);123 Node transformed_page = transformPage(page); 124 124 125 125 return transformed_page; … … 132 132 * we need to get any format element out of the page and add it to the xslt 133 133 * before transforming */ 134 protected ElementtransformPage(Element page) {134 protected Node transformPage(Element page) { 135 135 136 136 logger.debug("page before transfomring:"); … … 184 184 format_doc.appendChild(format_doc.importNode(format_elem, true)); 185 185 Element new_format = (Element)this.transformer.transform(stylesheet_doc, format_doc); 186 186 logger.debug("new format elem="+this.converter.getPrettyString(new_format)); 187 187 188 188 // add it in to the main stylesheet 189 189 GSXSLT.mergeStylesheets(style_doc, new_format); 190 190 } else { … … 196 196 } 197 197 198 // there is a thing called a URIResolver which you can set for a transformer or transformer factory. may be able to use this instead of this absoluteIncludepaths hack 199 GSXSLT.absoluteIncludePaths(style_doc, GlobalProperties.getGSDL3Home(), (String)this.config_params.get(GSConstants.SITE_NAME), collection, (String)this.config_params.get(GSConstants.INTERFACE_NAME), base_interfaces); 200 // put the page into a document - this is necessary for xslt to get the paths right if you have paths relative to the document root eg /page. 198 // there is a thing called a URIResolver which you can set for a 199 // transformer or transformer factory. may be able to use this 200 // instead of this absoluteIncludepaths hack 201 202 GSXSLT.absoluteIncludePaths(style_doc, GlobalProperties.getGSDL3Home(), 203 (String)this.config_params.get(GSConstants.SITE_NAME), 204 collection, (String)this.config_params.get(GSConstants.INTERFACE_NAME), 205 base_interfaces); 206 207 // put the page into a document - this is necessary for xslt to get 208 // the paths right if you have paths relative to the document root 209 // eg /page. 210 201 211 Document doc = this.converter.newDOM(); 202 212 doc.appendChild(doc.importNode(page, true));
Note:
See TracChangeset
for help on using the changeset viewer.