Ignore:
Timestamp:
2010-11-22T17:32:16+13:00 (13 years ago)
Author:
sjb48
Message:

Continued work on XHTML parsing for format statement saving. Found js code for ensuring XHTML (innerXHTML). Removed a few unneccessary bits of code from default servlet that were lingering around from when we first started playing with format statements.

Location:
main/trunk/greenstone3/src/java/org/greenstone/gsdl3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/SystemAction.java

    r23333 r23336  
    1717import javax.xml.parsers.DocumentBuilder;
    1818import javax.xml.parsers.DocumentBuilderFactory;
     19
     20import java.io.PrintWriter;
     21import java.io.StringWriter;
    1922
    2023import org.apache.log4j.*;
     
    7578            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    7679            DocumentBuilder builder = factory.newDocumentBuilder();
    77             InputSource is = new InputSource( new StringReader( format_string ) );
     80            String input = "<html><head><title></title></head><body>" + format_string + "</body></html>";
     81            InputSource is = new InputSource( new StringReader( input ) );
    7882            Document d = builder.parse( is );
    7983            page_response.appendChild(d);
     
    8185        catch( Exception ex ) {
    8286            logger.error("There was an exception "+ex);
     87           
     88            StringWriter sw = new StringWriter();
     89            PrintWriter pw = new PrintWriter(sw, true);
     90            ex.printStackTrace(pw);
     91            pw.flush();
     92            sw.flush();
     93            logger.error(sw.toString());
    8394        }
    8495
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/TransformingReceptionist.java

    r23312 r23336  
    548548    String publicID = "-//W3C//DTD HTML 4.01 Transitional//EN";
    549549    String systemID = "http://www.w3.org/TR/html4/loose.dtd";
    550        
     550
    551551    // Try to get the system and public ID from the current skin xsl document
    552552    // otherwise keep the default values.
Note: See TracChangeset for help on using the changeset viewer.