<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright 2002-2005 The Apache Software Foundation or its licensors,
  as applicable.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
<document> 
  <header> 
    <title>Welcome to the org.apache.forrest.plugin.input.Daisy Plugin</title> 
  </header> 
  <body> 
    <section>
      <title>Apache Forrest - org.apache.forrest.plugin.input.Daisy Plugin</title>
      <p>This plugin retrieves documents from a 
      <a href="http://www.cocoondev.org/daisy">Daisy</a>
      repository.</p>
    </section>
    
    <section>
      <title>Usage</title>
      
      <p>This plugin allows content to be retrieved from a 
      <a href="http://www.cocoondev.org/daisy/">Daisy CMS repository</a>
      and displayed alongside any other Forrest content. Unlike many
      other plugins there is some configuraiton of your project requried.</p>
            
      <section>
        <title>Configuration</title>
      
        <section>
          <title>Locationmap</title>
          
          <p>The project locationmap for a Daisy generated site is automatically
          created from the daisy navigation documents. This allows the URL of the
          published Forrest site to be set within the Daisy CMS system as opposed
          to using the daisy ID for the page.</p>
          
          <p>In order for Forrest to know the id of the navigation document to be
          used your project must set some required properties
          (see below for details). The project also needs to provide the following match in
          PROJECT_HOME/sitemap.xmap:</p>
          
          <source><![CDATA[
          
    <map:pipeline>
      <map:parameter name="expires" value="access plus 2 hours"/>
    
      <map:match pattern="locationmap-project.xml">
        <map:generate src="{project:daisy.publisher.URL}blob?documentId={project:daisy.navigation.docID}&amp;version=live&amp;partType=1"/>
        <map:transform src="{forrest:plugins}/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/navigation-to-locationmap.xsl">
          <map:parameter name="publisherURL" value="{project:daisy.publisher.URL}"/>
          <map:parameter name="pathPrefix" value="{project:daisy.pathPrefix}"/>
          <map:parameter name="navigationID" value="{project:daisy.navigation.docID}"/>
        </map:transform>
        <map:transform type="xinclude"/>
        <map:serialize type="xml"/>
      </map:match>
    </map:pipeline>
          ]]></source>
                            
          <p>If your site needs to provide additional locationmap entries it can
          do so by including them in 
          <code>PROJECT_HOME/src/documentation/locationmap-include.xml</code>.
          The matchers in this file will override any of the auto-generated matchers
          from the Daisy navigation file. The location of this file can be changed
          by overriding the locationmap pattern <code>daisy.locationmap.include</code>.</p>
        
          <note>The pipeline above
          caches the navigation for 2 hours. This is because it is computationally
          expensive to regenerate these files.</note>
        </section>
        
        <section>
          <title>Properties</title>
          
          <p>The table below describes all properties that this plugin exposes.</p>
          
          <table>
            <tr>
              <th>Property Name</th>
              <th>Description</th>
              <th>Default</th>
              <th>Required?</th>
            </tr>
            <tr>
              <td>daisy.publisher.URL</td>
              <td>The URL of the Diasy repository. This URL is the complete
              URL to the publisher interface, for example 
              <code>http://username:password@cms.domain.org:9263/publisher/</code>.</td>
              <td>No default</td>
              <td>Yes</td>
            </tr>
            <tr>
              <td>daisy.navigation.docID</td>
              <td>The diasy ID for the navigation document to use.</td>
              <td>No default</td>
              <td>Yes</td>
            </tr>
            <tr>
              <td>daisy.index.docID</td>
              <td>The daisy ID of the document to return when requesting "/index.html".</td>
              <td>No default</td>
              <td>Yes</td>
            </tr>
            <tr>
              <td>daisy.pathPrefix</td>
              <td>A prefix added to all paths to documents
              that are to be retrieved from the Daisy repository.</td>
              <td>Empty String</td>
              <td>No</td>
            </tr>
          </table>
        </section>
      </section>
      
      <section>
        <title>Using Daisy Navigation Documents</title>
        <p>It is possible to use a daisy navigation document in place of a local
        site.xml file. However, you may want to mix content from different sources
        by adding other entries to site.xml, ones that are not sourced from the 
        Daisy navigation document. Therefore, you still need a site.xml file.</p>
        
        <p>A minimal site.xml file for your project would be:</p>
        
        <source><![CDATA[
<site label="MyProj" href="" 
  xmlns="http://apache.org/forrest/linkmap/1.0" 
  xmlns:xi="http://www.w3.org/2001/XInclude" 
  tab="">
  <xi:include href="cocoon://1208.daisy.navigation"/>
</site><commit_msg>document new fileExt property<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright 2002-2005 The Apache Software Foundation or its licensors,
  as applicable.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
<document> 
  <header> 
    <title>Welcome to the org.apache.forrest.plugin.input.Daisy Plugin</title> 
  </header> 
  <body> 
    <section>
      <title>Apache Forrest - org.apache.forrest.plugin.input.Daisy Plugin</title>
      <p>This plugin retrieves documents from a 
      <a href="http://www.cocoondev.org/daisy">Daisy</a>
      repository.</p>
    </section>
    
    <section>
      <title>Usage</title>
      
      <p>This plugin allows content to be retrieved from a 
      <a href="http://www.cocoondev.org/daisy/">Daisy CMS repository</a>
      and displayed alongside any other Forrest content. Unlike many
      other plugins there is some configuraiton of your project requried.</p>
            
      <section>
        <title>Configuration</title>
      
        <section>
          <title>Locationmap</title>
          
          <p>The project locationmap for a Daisy generated site is automatically
          created from the daisy navigation documents. This allows the URL of the
          published Forrest site to be set within the Daisy CMS system as opposed
          to using the daisy ID for the page.</p>
          
          <p>In order for Forrest to know the id of the navigation document to be
          used your project must set some required properties
          (see below for details). The project also needs to provide the following match in
          PROJECT_HOME/sitemap.xmap:</p>
          
          <source><![CDATA[
    <map:pipeline>
      <map:parameter name="expires" value="access plus 2 hours"/>
    
      <map:match pattern="locationmap-project.xml">
        <map:generate src="{project:daisy.publisher.URL}blob?documentId={project:daisy.navigation.docID}&amp;version=live&amp;partType=1"/>
        <map:transform src="{forrest:plugins}/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/navigation-to-locationmap.xsl">
          <map:parameter name="publisherURL" value="{project:daisy.publisher.URL}"/>
          <map:parameter name="pathPrefix" value="{project:daisy.pathPrefix}"/>
          <map:parameter name="navigationID" value="{project:daisy.navigation.docID}"/>
        </map:transform>
        <map:transform type="xinclude"/>
        <map:serialize type="xml"/>
      </map:match>
    </map:pipeline>
          ]]></source>
                            
          <p>If your site needs to provide additional locationmap entries it can
          do so by including them in 
          <code>PROJECT_HOME/src/documentation/locationmap-include.xml</code>.
          The matchers in this file will override any of the auto-generated matchers
          from the Daisy navigation file. The location of this file can be changed
          by overriding the locationmap pattern <code>daisy.locationmap.include</code>.</p>
        
          <note>The pipeline above
          caches the navigation for 2 hours. This is because it is computationally
          expensive to regenerate these files.</note>
        </section>
        
        <section>
          <title>Properties</title>
          
          <p>The table below describes all properties that this plugin exposes.</p>
          
          <table>
            <tr>
              <th>Property Name</th>
              <th>Description</th>
              <th>Default</th>
              <th>Required?</th>
            </tr>
            <tr>
              <td>daisy.publisher.URL</td>
              <td>The URL of the Diasy repository. This URL is the complete
              URL to the publisher interface, for example 
              <code>http://username:password@cms.domain.org:9263/publisher/</code>.</td>
              <td>No default</td>
              <td>Yes</td>
            </tr>
            <tr>
              <td>daisy.navigation.docID</td>
              <td>The diasy ID for the navigation document to use.</td>
              <td>No default</td>
              <td>Yes</td>
            </tr>
            <tr>
              <td>daisy.index.docID</td>
              <td>The daisy ID of the document to return when requesting "/index.html".</td>
              <td>No default</td>
              <td>Yes</td>
            </tr>
            <tr>
              <td>daisy.pathPrefix</td>
              <td>A prefix added to all paths to documents
              that are to be retrieved from the Daisy repository.</td>
              <td>Empty String</td>
              <td>No</td>
            </tr>
            <tr>
              <td>daisy.fileExt</td>
              <td>An additional extension to the filename used to indicate which
              documents should be retrieved from Daisty. This extension is added to
              the filename so that it prefixes the normal extension. For example,
              <code>filename.daisyExt.html</code>.</td>
              <td>.daisy</td>
              <td>No</td>
            </tr>
          </table>
        </section>
      </section>
      
      <section>
        <title>Using Daisy Navigation Documents</title>
        <p>It is possible to use a daisy navigation document in place of a local
        site.xml file. However, you may want to mix content from different sources
        by adding other entries to site.xml, ones that are not sourced from the 
        Daisy navigation document. Therefore, you still need a site.xml file.</p>
        
        <p>A minimal site.xml file for your project would be:</p>
        
        <source><![CDATA[
<site label="MyProj" href="" 
  xmlns="http://apache.org/forrest/linkmap/1.0" 
  xmlns:xi="http://www.w3.org/2001/XInclude" 
  tab="">
  <xi:include href="cocoon://1208.daisy.navigation"/>
</site>
{'fraction_non_alphanumeric': 0.1053728949478749, 'fraction_numerical': 0.005934242181234964, 'mean_word_length': 2.1053286852589643, 'pattern_counts': {'":': 0, '<': 279, '<?xml version=': 2, '>': 277, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, 'xml': 20}, 'pii_count': 2, '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': '1094948', 'n_tokens_mistral': 3547, 'n_tokens_neox': 3329, 'n_words': 1076}