Changeset 26018


Ignore:
Timestamp:
2012-07-24T15:36:28+12:00 (9 years ago)
Author:
sjm84
Message:

Changing the default format statement to include some templates for document display

Location:
main/trunk/gli/src/org/greenstone/gatherer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/cdm/Format4gs3Manager.java

    r26016 r26018  
    3232import javax.swing.undo.*;
    3333import javax.xml.parsers.DocumentBuilderFactory;
     34import javax.xml.ws.Dispatch;
    3435
    3536import org.fife.ui.rsyntaxtextarea.*;
     
    9596    }
    9697    static final private String SEARCH = "search";
    97     static final private String DISPLAY_FORMAT = "<gsf:option name=\"TOC\" value=\"true\"/>";
     98    static final private String DISPLAY_DEFAULT_FORMAT;
     99    static
     100    {
     101        // @formatter:off
     102        String DISPLAY_DEFAULT_FORMAT_TEMP = "" +
     103        "<gsf:option name=\"TOC\" value=\"true\"/>" +
     104        "<!--" +
     105            "Overwriting this template allows you to change the heading of the document." +
     106        "-->" +
     107        "<!--" +
     108        "<gsf:template name=\"documentHeading\">" +
     109            "<span style=\"font-weight:bold; font-size: 120%;\">" +
     110                "<xsl:call-template name=\"choose-title\"/>" +
     111            "</span>" +
     112        "</gsf:template>" +
     113        "-->" +
     114        "<!--" +
     115            "Overwriting this template can be used to redefine the content of the whole document." +
     116            "This is useful for simple documents, but not recommended for more complex documents" +
     117            "(e.g. hierachical and paged documents) as it can prevent any sub-sections from showing." +
     118        "-->" +
     119        "<!--" +
     120        "<gsf:template name=\"documentContent\">" +
     121            "<xsl:call-template name=\"wrappedSectionImage\"/>" +
     122            "<xsl:call-template name=\"wrappedSectionText\"/>" +
     123        "</gsf:template>" +
     124        "-->" +
     125        "<!--" +
     126            "Overwriting this template can be used to change the content of section headings." +
     127        "-->" +
     128        "<!--" +
     129        "<gsf:template name=\"sectionHeading\">" +
     130            "<xsl:call-template name=\"choose-title\"/>" +
     131        "</gsf:template>" +
     132        "-->" +
     133        "<!--" +
     134            "Overwriting this template can be used to change the content of the top-level section." +
     135        "-->" +
     136        "<!--" +
     137        "<gsf:template name=\"topLevelSectionContent\">" +
     138            "<xsl:call-template name=\"wrappedSectionImage\"/>" +
     139            "<xsl:call-template name=\"wrappedSectionText\"/>" +
     140        "</gsf:template>" +
     141        "-->" +
     142        "<!--" +
     143            "Overwriting this template can be used to change the content of sections." +
     144        "-->" +
     145        "<!--" +
     146        "<gsf:template name=\"sectionContent\">" +
     147            "<xsl:call-template name=\"wrappedSectionImage\"/>" +
     148            "<xsl:call-template name=\"wrappedSectionText\"/>" +
     149        "</gsf:template>" +
     150        "-->";
     151        // @formatter:on
     152       
     153        DISPLAY_DEFAULT_FORMAT = DISPLAY_DEFAULT_FORMAT_TEMP;
     154    }
    98155    static final private String DISPLAY = "display";
    99156
     
    173230    static final private String SEARCHTYPE_FORMAT = "plain,simpleform,advancedform";
    174231    static final private String SEARCHTYPE = "searchType";
    175   static final private String[] FEATURE_NAME = { GLOBAL, SEARCH, DISPLAY, CLASSIFIER_DEFAULT, SEARCHTYPE };
    176   static final private String[] FEATURE_FORMAT = { GLOBAL_FORMAT, SEARCH_FORMAT, DISPLAY_FORMAT, CLASSIFIER_DEFAULT_FORMAT, SEARCHTYPE_FORMAT };
     232    static final private String[] FEATURE_NAME = { SEARCH, DISPLAY, CLASSIFIER_DEFAULT, SEARCHTYPE };
     233    static final private String[] FEATURE_FORMAT = { SEARCH_FORMAT, DISPLAY_DEFAULT_FORMAT, CLASSIFIER_DEFAULT_FORMAT, SEARCHTYPE_FORMAT };
    177234
    178235    static private HashMap default_format_map = null;
  • main/trunk/gli/src/org/greenstone/gatherer/util/XMLTools.java

    r25786 r26018  
    10001000            return;
    10011001        }
    1002 
     1002       
    10031003        if (e.getNodeType() == Node.COMMENT_NODE)
    10041004        {
    10051005            if (e.getNodeValue() != "")
    10061006            {
    1007                 sb.append("<!--" + e.getNodeValue() + "-->");
     1007                sb.append("<!--\n" + e.getNodeValue() + "\n-->\n");
    10081008            }
    10091009            return;
Note: See TracChangeset for help on using the changeset viewer.