<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>
  <!-- components context -->

  <!-- Render Factory for creating Wiki Renderer Contexts -->
  <bean id="uk.ac.cam.caret.sakai.rwiki.service.api.radeox.RenderContextFactory"
    class="uk.ac.cam.caret.sakai.rwiki.component.radeox.service.impl.RenderContextFactoryImpl"
       init-method="init" 
 	>
  </bean>

  <!-- Wiki engine factory -->
  <bean id="uk.ac.cam.caret.sakai.rwiki.service.api.radeox.RenderEngineFactory"
    class="uk.ac.cam.caret.sakai.rwiki.component.radeox.service.impl.RenderEngineFactoryImpl"
       init-method="init" 
 	>  
    <property name="externalImageLink"><value>&lt;img src="/sakai-rwiki-tool/images/icklearrow.gif" alt="external link: " title="external link"/&gt;</value></property>
  </bean>


  <bean id="uk.ac.cam.caret.sakai.rwiki.service.api.RWikiSecurityService"
    class="uk.ac.cam.caret.sakai.rwiki.component.service.impl.RWikiSecurityServiceImpl"
    init-method="init" 
    >

  </bean>

  <!-- The component level Render service -->
  <bean id="uk.ac.cam.caret.sakai.rwiki.service.api.RenderService"
    class="uk.ac.cam.caret.sakai.rwiki.component.service.impl.RenderServiceImpl"
    init-method="init" 
    >
  </bean>

  <!-- The RWiki Object service, component level -->
  <bean id="uk.ac.cam.caret.sakai.rwiki.service.api.RWikiObjectService"
    class="uk.ac.cam.caret.sakai.rwiki.component.service.impl.RWikiObjectServiceImpl"
    init-method="init"  >
    <property name="RWikiCurrentObjectDao"><ref bean="rwikiCurrentObjectDao"/></property>
    <property name="RWikiHistoryObjectDao"><ref bean="rwikiHistoryObjectDao"/></property>
    <property name="handlers">
      <map>
        <entry key=""><ref bean="rwikiRAWHandler" /></entry>
        <entry key="html"><ref bean="rwikiHTMLHandler" /></entry>
        <!-- 
	<entry key="odt"><ref bean="rwikiODTHandler" /></entry>
	-->
        <entry key="rtf"><ref bean="rwikiRTFHandler" /></entry>
        <entry key="pdf"><ref bean="rwikiPDFHandler" /></entry>
        <entry key="10.rss"><ref bean="rwiki10RSSHandler" /></entry>
        <entry key="09.rss"><ref bean="rwiki09RSSHandler" /></entry>
        <entry key="20.rss"><ref bean="rwiki20RSSHandler" /></entry>
        <entry key="atom"><ref bean="rwikiAtomHandler" /></entry>
        <entry key="fop"><ref bean="rwikiFOPHandler" /></entry>
      </map>
    </property>
  </bean>

  <!-- The base level radeox render engine -->

  <bean id="org.radeox.api.engine.RenderEngine" 
  	class="uk.ac.cam.caret.sakai.rwiki.component.radeox.service.impl.RWikiBaseRenderEngine" 
  	init-method="init"
  	>
  </bean>



  <!-- The Rendered content cache, impl uses ehcache which is initialised on first use, if cache fails
  it is re-initialised -->
  <bean id="uk.ac.cam.caret.sakai.rwiki.service.api.radeox.RenderCache" 
  	class="uk.ac.cam.caret.sakai.rwiki.component.radeox.service.impl.RenderCacheImpl" 
    init-method="init" >
    <property name="cacheName"><value>rwiki-render-cache</value></property>
  </bean>
  
  
  <bean id="rwikiRAWHandler" 
    class="uk.ac.cam.caret.sakai.rwiki.component.service.impl.XSLTEntityHandler"  
    init-method="init"  destroy-method="destroy" >
    <!-- from XSLTEntityHandler -->
    <!-- The transformer use on the stream -->
    <property name="xslt"><value>/uk/ac/cam/caret/sakai/rwiki/component/service/impl/null.xslt</value></property>
    <property name="minorType"><value></value></property>    
    <property name="defaultStackTrace"><value>Failed To generate Stack Trace : {0}</value></property>
    <property name="errorFormat"><value>Error encounvered performing transform : {0} \n {1}</value></property>
    <property name="authZPrefix" ><value>/wiki</value></property>
    <property name="anchorLinkFormat" ><value>/access/wiki{0}.#{1}</value></property>
    <property name="standardLinkFormat" ><value>/access/wiki{0}.</value></property>
    <property name="hrefTagFormat" ><value>&lt;a href="{0}" &gt;{1}&lt;/a&gt;</value></property>
    <property name="accessURLStart" ><value>/wiki/</value></property>
    <property name="responseHeaders">
      <map>
        <entry key="content-type"><value>text/xml</value></entry>
      </map>     
    </property>
    <property name="outputProperties">
      <map>
        <entry key="indent"><value>yes</value></entry>
        <entry key="encoding"><value>UTF-8</value></entry>
        <entry key="media-type"><value>text/xml</value></entry>
        <entry key="{http://xml.apache.org/xalan}indent-amount"><value>2</value></entry> 
      </map>     
    </property>
  </bean>
  
  <!-- these are EntityProducer handler beans, the config is bean dependant -->
  <bean id="rwikiHTMLHandler" 
    class="uk.ac.cam.caret.sakai.rwiki.component.service.impl.XSLTEntityHandler"  
    init-method="init"  destroy-method="destroy" >
      <!-- from XSLTEntityHandler -->
      <!-- The transformer use on the stream -->
     <property name="xslt"><value>/uk/ac/cam/caret/sakai/rwiki/component/service/impl/tohtml.xslt</value></property>
    <property name="minorType"><value>html</value></property>    
    <property name="defaultStackTrace"><value>Failed To generate Stack Trace : {0}</value></property>
    <property name="errorFormat"><value>Error encounvered performing transform : {0} \n {1}</value></property>
    <property name="authZPrefix" ><value>/wiki</value></property>
    <property name="anchorLinkFormat" ><value>/access/wiki{0}.html#{1}</value></property>
    <property name="standardLinkFormat" ><value>/access/wiki{0}.html</value></property>
    <property name="hrefTagFormat" ><value>&lt;a href="{0}" &gt;{1}&lt;/a&gt;</value></property>
    <property name="accessURLStart" ><value>/wiki/</value></property>
    <property name="feedFormat"><value>&lt;a href="{0}html" target="feeds"&gt;&lt;img src="/library/image/sakai/html.gif" border="0"  alt="Html" /&gt;&lt;/a&gt;</value></property>
    <property name="responseHeaders">
      <map>
        <entry key="content-type"><value>text/html</value></entry>
      </map>     
    </property>
    <property name="outputProperties">
      <map>
        <entry key="omit-xml-declaration"><value>yes</value></entry>
        <entry key="indent"><value>yes</value></entry>
        <entry key="encoding"><value>UTF-8</value></entry>
        <entry key="version"><value>4.0</value></entry>
        <entry key="media-type"><value>text/html; charset=UTF-8</value></entry>
        <entry key="{http://xml.apache.org/xalan}indent-amount"><value>2</value></entry> 
		<entry key="{http://xml.apache.org/xalan}content-handler"><value>uk.ac.cam.caret.sakai.rwiki.component.service.impl.XHTMLSerializer</value></entry>
<!--        
      <entry key="{http://xml.apache.org/xalan}entities"><value>org/apache/xml/serializer/HTMLEntities</value></entry> 

-->
        <entry key="{http://xml.apache.org/xalan}use-url-escaping"><value>yes</value></entry> 
        <entry key="{http://xml.apache.org/xalan}omit-meta-tag"><value>no</value></entry> 
      </map>     
    </property>
  </bean>
  <bean id="rwikiPDFHandler" 
    class="uk.ac.cam.caret.sakai.rwiki.component.service.impl.XSLTEntityHandler"  
    init-method="init"  destroy-method="destroy" >
    
    <property name="experimental"><value>true</value></property>
    
    <!-- from XSLTEntityHandler -->
    <!-- The transformer use on the stream -->
    <property name="xslt"><value>/uk/ac/cam/caret/sakai/rwiki/component/service/impl/xhtml2fo.xslt</value></property><commit_msg>SAK-4287: Adds doctype to public view<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>
  <!-- components context -->

  <!-- Render Factory for creating Wiki Renderer Contexts -->
  <bean id="uk.ac.cam.caret.sakai.rwiki.service.api.radeox.RenderContextFactory"
    class="uk.ac.cam.caret.sakai.rwiki.component.radeox.service.impl.RenderContextFactoryImpl"
       init-method="init" 
 	>
  </bean>

  <!-- Wiki engine factory -->
  <bean id="uk.ac.cam.caret.sakai.rwiki.service.api.radeox.RenderEngineFactory"
    class="uk.ac.cam.caret.sakai.rwiki.component.radeox.service.impl.RenderEngineFactoryImpl"
       init-method="init" 
 	>  
    <property name="externalImageLink"><value>&lt;img src="/sakai-rwiki-tool/images/icklearrow.gif" alt="external link: " title="external link"/&gt;</value></property>
  </bean>


  <bean id="uk.ac.cam.caret.sakai.rwiki.service.api.RWikiSecurityService"
    class="uk.ac.cam.caret.sakai.rwiki.component.service.impl.RWikiSecurityServiceImpl"
    init-method="init" 
    >

  </bean>

  <!-- The component level Render service -->
  <bean id="uk.ac.cam.caret.sakai.rwiki.service.api.RenderService"
    class="uk.ac.cam.caret.sakai.rwiki.component.service.impl.RenderServiceImpl"
    init-method="init" 
    >
  </bean>

  <!-- The RWiki Object service, component level -->
  <bean id="uk.ac.cam.caret.sakai.rwiki.service.api.RWikiObjectService"
    class="uk.ac.cam.caret.sakai.rwiki.component.service.impl.RWikiObjectServiceImpl"
    init-method="init"  >
    <property name="RWikiCurrentObjectDao"><ref bean="rwikiCurrentObjectDao"/></property>
    <property name="RWikiHistoryObjectDao"><ref bean="rwikiHistoryObjectDao"/></property>
    <property name="handlers">
      <map>
        <entry key=""><ref bean="rwikiRAWHandler" /></entry>
        <entry key="html"><ref bean="rwikiHTMLHandler" /></entry>
        <!-- 
	<entry key="odt"><ref bean="rwikiODTHandler" /></entry>
	-->
        <entry key="rtf"><ref bean="rwikiRTFHandler" /></entry>
        <entry key="pdf"><ref bean="rwikiPDFHandler" /></entry>
        <entry key="10.rss"><ref bean="rwiki10RSSHandler" /></entry>
        <entry key="09.rss"><ref bean="rwiki09RSSHandler" /></entry>
        <entry key="20.rss"><ref bean="rwiki20RSSHandler" /></entry>
        <entry key="atom"><ref bean="rwikiAtomHandler" /></entry>
        <entry key="fop"><ref bean="rwikiFOPHandler" /></entry>
      </map>
    </property>
  </bean>

  <!-- The base level radeox render engine -->

  <bean id="org.radeox.api.engine.RenderEngine" 
  	class="uk.ac.cam.caret.sakai.rwiki.component.radeox.service.impl.RWikiBaseRenderEngine" 
  	init-method="init"
  	>
  </bean>



  <!-- The Rendered content cache, impl uses ehcache which is initialised on first use, if cache fails
  it is re-initialised -->
  <bean id="uk.ac.cam.caret.sakai.rwiki.service.api.radeox.RenderCache" 
  	class="uk.ac.cam.caret.sakai.rwiki.component.radeox.service.impl.RenderCacheImpl" 
    init-method="init" >
    <property name="cacheName"><value>rwiki-render-cache</value></property>
  </bean>
  
  
  <bean id="rwikiRAWHandler" 
    class="uk.ac.cam.caret.sakai.rwiki.component.service.impl.XSLTEntityHandler"  
    init-method="init"  destroy-method="destroy" >
    <!-- from XSLTEntityHandler -->
    <!-- The transformer use on the stream -->
    <property name="xslt"><value>/uk/ac/cam/caret/sakai/rwiki/component/service/impl/null.xslt</value></property>
    <property name="minorType"><value></value></property>    
    <property name="defaultStackTrace"><value>Failed To generate Stack Trace : {0}</value></property>
    <property name="errorFormat"><value>Error encounvered performing transform : {0} \n {1}</value></property>
    <property name="authZPrefix" ><value>/wiki</value></property>
    <property name="anchorLinkFormat" ><value>/access/wiki{0}.#{1}</value></property>
    <property name="standardLinkFormat" ><value>/access/wiki{0}.</value></property>
    <property name="hrefTagFormat" ><value>&lt;a href="{0}" &gt;{1}&lt;/a&gt;</value></property>
    <property name="accessURLStart" ><value>/wiki/</value></property>
    <property name="responseHeaders">
      <map>
        <entry key="content-type"><value>text/xml</value></entry>
      </map>     
    </property>
    <property name="outputProperties">
      <map>
        <entry key="indent"><value>yes</value></entry>
        <entry key="encoding"><value>UTF-8</value></entry>
        <entry key="media-type"><value>text/xml</value></entry>
        <entry key="{http://xml.apache.org/xalan}indent-amount"><value>2</value></entry> 
      </map>     
    </property>
  </bean>
  
  <!-- these are EntityProducer handler beans, the config is bean dependant -->
  <bean id="rwikiHTMLHandler" 
    class="uk.ac.cam.caret.sakai.rwiki.component.service.impl.XSLTEntityHandler"  
    init-method="init"  destroy-method="destroy" >
      <!-- from XSLTEntityHandler -->
      <!-- The transformer use on the stream -->
     <property name="xslt"><value>/uk/ac/cam/caret/sakai/rwiki/component/service/impl/tohtml.xslt</value></property>
    <property name="minorType"><value>html</value></property>    
    <property name="defaultStackTrace"><value>Failed To generate Stack Trace : {0}</value></property>
    <property name="errorFormat"><value>Error encounvered performing transform : {0} \n {1}</value></property>
    <property name="authZPrefix" ><value>/wiki</value></property>
    <property name="anchorLinkFormat" ><value>/access/wiki{0}.html#{1}</value></property>
    <property name="standardLinkFormat" ><value>/access/wiki{0}.html</value></property>
    <property name="hrefTagFormat" ><value>&lt;a href="{0}" &gt;{1}&lt;/a&gt;</value></property>
    <property name="accessURLStart" ><value>/wiki/</value></property>
    <property name="feedFormat"><value>&lt;a href="{0}html" target="feeds"&gt;&lt;img src="/library/image/sakai/html.gif" border="0"  alt="Html" /&gt;&lt;/a&gt;</value></property>
    <property name="responseHeaders">
      <map>
        <entry key="content-type"><value>text/html</value></entry>
      </map>     
    </property>
    <property name="outputProperties">
      <map>
        <entry key="omit-xml-declaration"><value>yes</value></entry>
        <entry key="indent"><value>yes</value></entry>
        <entry key="encoding"><value>UTF-8</value></entry>
        <entry key="version"><value>4.0</value></entry>
        <entry key="media-type"><value>text/html; charset=UTF-8</value></entry>
        <entry key="doctype-public"><value>-//W3C//DTD XHTML 1.0 Transitional//EN</value></entry>
        <entry key="doctype-system"><value>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</value></entry>
        <entry key="{http://xml.apache.org/xalan}indent-amount"><value>2</value></entry> 
		<entry key="{http://xml.apache.org/xalan}content-handler"><value>uk.ac.cam.caret.sakai.rwiki.component.service.impl.XHTMLSerializer</value></entry>
<!--        
      <entry key="{http://xml.apache.org/xalan}entities"><value>org/apache/xml/serializer/HTMLEntities</value></entry> 

-->
        <entry key="{http://xml.apache.org/xalan}use-url-escaping"><value>yes</value></entry> 
        <entry key="{http://xml.apache.org/xalan}omit-meta-tag"><value>no</value></entry> 
      </map>     
    </property>
  </bean>
  <bean id="rwikiPDFHandler" 
    class="uk.ac.cam.caret.sakai.rwiki.component.service.impl.XSLTEntityHandler"  
    init-method="init"  destroy-method="destroy" >
    
    <property name="experimental"><value>true</value></property>
    
    <!-- from XSLTEntityHandler -->
    <!-- The transformer use on the stream -->
    <property name="xslt"><value>/uk/ac/cam/caret/sakai/rwiki/component/service/impl/xhtml2fo.xslt</value></property>
{'fraction_non_alphanumeric': 0.19330782698917062, 'fraction_numerical': 0.005965890668568835, 'mean_word_length': 3.816364772017489, 'pattern_counts': {'":': 0, '<': 511, '<?xml version=': 2, '>': 511, 'https://': 0, 'lorem ipsum': 0, 'www.': 3, 'xml': 22}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5217522', 'n_tokens_mistral': 5248, 'n_tokens_neox': 5059, 'n_words': 693}