<commit_before><?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2007 Orbeon, Inc.
  
    This program is free software; you can redistribute it and/or modify it under the terms of the
    GNU Lesser General Public License as published by the Free Software Foundation; either version
    2.1 of the License, or (at your option) any later version.
  
    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
    without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    See the GNU Lesser General Public License for more details.
  
    The full text of the license is available at http://www.gnu.org/copyleft/lesser.html
-->
<config xmlns="http://www.orbeon.com/oxf/controller"
        xmlns:oxf="http://www.orbeon.com/oxf/processors">

    <!-- Home redirects to Form Builder summary page -->
    <page path-info="/fr/?" matcher="oxf:perl5-matcher">
        <action>
            <result page="summary" transform="oxf:xinclude">
                <request xmlns="">
                    <app>orbeon</app>
                    <form>builder</form>
                </request>
            </result>
        </action>
    </page>

    <!-- ==== Pages ==== -->

    <page id="summary"
          path-info="/fr/([^/]+)/([^/]+)/?" matcher="oxf:perl5-matcher"
          default-submission="summary/submission-page-summary.xml"
          model="summary/view.xhtml" view="html-view.xpl">
        <setvalue ref="/*/app" matcher-group="1"/>
        <setvalue ref="/*/form" matcher-group="2"/>
    </page>

    <!-- New document -->
    <page path-info="/fr/([^/]+)/([^/]+)/(new)(/)?" matcher="oxf:perl5-matcher"
          default-submission="submission-page-detail.xml"
          model="detail/read-form.xpl" view="html-view.xpl">
        <setvalue ref="/*/app" matcher-group="1"/>
        <setvalue ref="/*/form" matcher-group="2"/>
        <setvalue ref="/*/mode" matcher-group="3"/>
    </page>

    <!-- Print document to HTML -->
    <page path-info="/fr/([^/]+)/([^/]+)/(print)" matcher="oxf:perl5-matcher"
          view="print-html.xpl"/>

    <!-- Print document to PDF (automatic mode) -->
    <page path-info="/fr/([^/]+)/([^/]+)/(pdf)" matcher="oxf:perl5-matcher"
          view="print-pdf.xpl"/>

    <!-- Print document to PDF (template mode) -->
    <page path-info="/fr/([^/]+)/([^/]+)/(pdf-template)" matcher="oxf:perl5-matcher"
          view="print-pdf-template.xpl"/>

    <!-- Edit document -->
    <page path-info="/fr/([^/]+)/([^/]+)/([^/]+)/(edit)" matcher="oxf:perl5-matcher"
          default-submission="submission-page-detail.xml"
          model="detail/read-form.xpl" view="html-view.xpl">
        <setvalue ref="/*/app" matcher-group="1"/>
        <setvalue ref="/*/form" matcher-group="2"/>
        <setvalue ref="/*/document" matcher-group="3"/>
        <setvalue ref="/*/mode" matcher-group="4"/>
    </page>

    <!-- View document as HTML -->
    <page path-info="/fr/([^/]+)/([^/]+)/([^/]+)/(view)" matcher="oxf:perl5-matcher"
          default-submission="submission-page-detail.xml"
          model="detail/read-form.xpl" view="html-view.xpl">
        <setvalue ref="/*/app" matcher-group="1"/>
        <setvalue ref="/*/form" matcher-group="2"/>
        <setvalue ref="/*/document" matcher-group="3"/>
        <setvalue ref="/*/mode" matcher-group="4"/>
    </page>

    <!-- View document as PDF -->
    <page path-info="/fr/([^/]+)/([^/]+)/([^/]+)/(pdf)" matcher="oxf:perl5-matcher"
          default-submission="submission-page-detail.xml"
          model="detail/read-form.xpl" view="pdf-view.xpl">
        <setvalue ref="/*/app" matcher-group="1"/>
        <setvalue ref="/*/form" matcher-group="2"/>
        <setvalue ref="/*/document" matcher-group="3"/>
        <setvalue ref="/*/mode" matcher-group="4"/>
    </page>

    <!-- Test form by retrieving form from the database first -->
    <page path-info="/fr/([^/]+)/([^/]+)/([^/]+)/(test)" matcher="oxf:perl5-matcher"
          default-submission="submission-page-detail.xml"
          model="test-model.xpl" view="html-view.xpl">
        <setvalue ref="/*/app" matcher-group="1"/>
        <setvalue ref="/*/form" matcher-group="2"/>
        <setvalue ref="/*/document" matcher-group="3"/>
        <setvalue ref="/*/mode" matcher-group="4"/>
    </page>

    <!-- Test form "inline" (when being edited) with new empty document -->
    <page id="test-form" path-info="/fr/([^/]+)/([^/]+)/(test)" matcher="oxf:perl5-matcher"
          model="inline-test-model.xpl" view="html-view.xpl">
        <setvalue ref="/*/app" matcher-group="1"/>
        <setvalue ref="/*/form" matcher-group="2"/>
        <setvalue ref="/*/mode" matcher-group="3"/>
    </page>

    <!-- Upload document and start from there -->
    <page path-info="/fr/upload" model="import-export/upload.xpl"/>

    <!-- Serve document previously produced -->
    <page path-info="/fr/serve" model="import-export/serve.xpl" default-submission="import-export/serve-instance.xml">
        <setvalue ref="/instance/uuid" parameter="uuid"/>
        <setvalue ref="/instance/filename" parameter="filename"/>
    </page>

    <!-- Custom pages provided by the project -->
    <page path-info="/fr/page/custom/([^/]+)/.*" matcher="oxf:perl5-matcher"
          model="/forms/${1}/page/page-flow.xml"/>

    <!-- ==== Built-in eXist-based Persistence Services ==== -->

    <!-- Create, Read, Update and Delete operations (id provided) -->
    <page path-info="/fr/service/exist/crud/([^/]+/[^/]+/(form/[^/]+|data/[^/]+/[^/]+))" matcher="oxf:perl5-matcher"
          model="persistence/exist/crud.xpl"/>

    <!-- Search -->
    <page path-info="/fr/service/exist/search/([^/]+)/([^/]+)" matcher="oxf:perl5-matcher"
          view="persistence/exist/search.xpl">
        <setvalue ref="/*/app" matcher-group="1"/>
        <setvalue ref="/*/form" matcher-group="2"/>
    </page>

    <!-- List deployed forms for a given application -->
    <page path-info="/fr/service/exist/list/([^/]+)" matcher="oxf:perl5-matcher"
          default-submission="persistence/exist/list-submission.xml"
          view="persistence/exist/list.xpl">
        <setvalue ref="/*/app" matcher-group="1"/>
    </page>

    <!-- ==== Built-in Resource Manager-Based Persistence Services ==== -->

    <!-- Create, Read, Update and Delete operations (id provided) -->
    <page path-info="/fr/service/resource/crud/([^/]+/[^/]+/(form/[^/]+|data/[^/]+/[^/]+))" matcher="oxf:perl5-matcher"
          default-submission="submission-service-resource.xml"
          model="persistence/resource/crud.xpl">
        <setvalue ref="/*/resource" matcher-group="1"/>
    </page>

    <!-- ==== Other Services ==== -->

    <!-- Generate HTML to be saved -->
    <page path-info="/fr/service/import-export/save-generate" view="import-export/save-generate.xpl"/>

    <!-- Custom services provided by the project -->
    <page path-info="/fr/service/custom/([^/]+)/.*" matcher="oxf:perl5-matcher"
          model="/forms/${1}/service/page-flow.xml"/>

    <epilogue url="oxf:/config/epilogue.xpl"/>

</config><commit_msg>Change path for custom pages and services, so we don't need to have page flow<commit_after><?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2007 Orbeon, Inc.
  
    This program is free software; you can redistribute it and/or modify it under the terms of the
    GNU Lesser General Public License as published by the Free Software Foundation; either version
    2.1 of the License, or (at your option) any later version.
  
    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
    without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    See the GNU Lesser General Public License for more details.
  
    The full text of the license is available at http://www.gnu.org/copyleft/lesser.html
-->
<config xmlns="http://www.orbeon.com/oxf/controller"
        xmlns:oxf="http://www.orbeon.com/oxf/processors">

    <!-- Home redirects to Form Builder summary page -->
    <page path-info="/fr/?" matcher="oxf:perl5-matcher">
        <action>
            <result page="summary" transform="oxf:xinclude">
                <request xmlns="">
                    <app>orbeon</app>
                    <form>builder</form>
                </request>
            </result>
        </action>
    </page>

    <!-- ==== Pages ==== -->

    <page id="summary"
          path-info="/fr/([^/]+)/([^/]+)/?" matcher="oxf:perl5-matcher"
          default-submission="summary/submission-page-summary.xml"
          model="summary/view.xhtml" view="html-view.xpl">
        <setvalue ref="/*/app" matcher-group="1"/>
        <setvalue ref="/*/form" matcher-group="2"/>
    </page>

    <!-- New document -->
    <page path-info="/fr/([^/]+)/([^/]+)/(new)(/)?" matcher="oxf:perl5-matcher"
          default-submission="submission-page-detail.xml"
          model="detail/read-form.xpl" view="html-view.xpl">
        <setvalue ref="/*/app" matcher-group="1"/>
        <setvalue ref="/*/form" matcher-group="2"/>
        <setvalue ref="/*/mode" matcher-group="3"/>
    </page>

    <!-- Print document to HTML -->
    <page path-info="/fr/([^/]+)/([^/]+)/(print)" matcher="oxf:perl5-matcher"
          view="print-html.xpl"/>

    <!-- Print document to PDF (automatic mode) -->
    <page path-info="/fr/([^/]+)/([^/]+)/(pdf)" matcher="oxf:perl5-matcher"
          view="print-pdf.xpl"/>

    <!-- Print document to PDF (template mode) -->
    <page path-info="/fr/([^/]+)/([^/]+)/(pdf-template)" matcher="oxf:perl5-matcher"
          view="print-pdf-template.xpl"/>

    <!-- Edit document -->
    <page path-info="/fr/([^/]+)/([^/]+)/([^/]+)/(edit)" matcher="oxf:perl5-matcher"
          default-submission="submission-page-detail.xml"
          model="detail/read-form.xpl" view="html-view.xpl">
        <setvalue ref="/*/app" matcher-group="1"/>
        <setvalue ref="/*/form" matcher-group="2"/>
        <setvalue ref="/*/document" matcher-group="3"/>
        <setvalue ref="/*/mode" matcher-group="4"/>
    </page>

    <!-- View document as HTML -->
    <page path-info="/fr/([^/]+)/([^/]+)/([^/]+)/(view)" matcher="oxf:perl5-matcher"
          default-submission="submission-page-detail.xml"
          model="detail/read-form.xpl" view="html-view.xpl">
        <setvalue ref="/*/app" matcher-group="1"/>
        <setvalue ref="/*/form" matcher-group="2"/>
        <setvalue ref="/*/document" matcher-group="3"/>
        <setvalue ref="/*/mode" matcher-group="4"/>
    </page>

    <!-- View document as PDF -->
    <page path-info="/fr/([^/]+)/([^/]+)/([^/]+)/(pdf)" matcher="oxf:perl5-matcher"
          default-submission="submission-page-detail.xml"
          model="detail/read-form.xpl" view="pdf-view.xpl">
        <setvalue ref="/*/app" matcher-group="1"/>
        <setvalue ref="/*/form" matcher-group="2"/>
        <setvalue ref="/*/document" matcher-group="3"/>
        <setvalue ref="/*/mode" matcher-group="4"/>
    </page>

    <!-- Test form by retrieving form from the database first -->
    <page path-info="/fr/([^/]+)/([^/]+)/([^/]+)/(test)" matcher="oxf:perl5-matcher"
          default-submission="submission-page-detail.xml"
          model="test-model.xpl" view="html-view.xpl">
        <setvalue ref="/*/app" matcher-group="1"/>
        <setvalue ref="/*/form" matcher-group="2"/>
        <setvalue ref="/*/document" matcher-group="3"/>
        <setvalue ref="/*/mode" matcher-group="4"/>
    </page>

    <!-- Test form "inline" (when being edited) with new empty document -->
    <page id="test-form" path-info="/fr/([^/]+)/([^/]+)/(test)" matcher="oxf:perl5-matcher"
          model="inline-test-model.xpl" view="html-view.xpl">
        <setvalue ref="/*/app" matcher-group="1"/>
        <setvalue ref="/*/form" matcher-group="2"/>
        <setvalue ref="/*/mode" matcher-group="3"/>
    </page>

    <!-- Upload document and start from there -->
    <page path-info="/fr/upload" model="import-export/upload.xpl"/>

    <!-- Serve document previously produced -->
    <page path-info="/fr/serve" model="import-export/serve.xpl" default-submission="import-export/serve-instance.xml">
        <setvalue ref="/instance/uuid" parameter="uuid"/>
        <setvalue ref="/instance/filename" parameter="filename"/>
    </page>

    <!-- Custom pages provided by the project -->
    <page path-info="/fr/page/custom/([^/]+)/([^/]+)" matcher="oxf:perl5-matcher"
          view="/forms/${1}/page/${2}.xhtml"/>

    <!-- ==== Built-in eXist-based Persistence Services ==== -->

    <!-- Create, Read, Update and Delete operations (id provided) -->
    <page path-info="/fr/service/exist/crud/([^/]+/[^/]+/(form/[^/]+|data/[^/]+/[^/]+))" matcher="oxf:perl5-matcher"
          model="persistence/exist/crud.xpl"/>

    <!-- Search -->
    <page path-info="/fr/service/exist/search/([^/]+)/([^/]+)" matcher="oxf:perl5-matcher"
          view="persistence/exist/search.xpl">
        <setvalue ref="/*/app" matcher-group="1"/>
        <setvalue ref="/*/form" matcher-group="2"/>
    </page>

    <!-- List deployed forms for a given application -->
    <page path-info="/fr/service/exist/list/([^/]+)" matcher="oxf:perl5-matcher"
          default-submission="persistence/exist/list-submission.xml"
          view="persistence/exist/list.xpl">
        <setvalue ref="/*/app" matcher-group="1"/>
    </page>

    <!-- ==== Built-in Resource Manager-Based Persistence Services ==== -->

    <!-- Create, Read, Update and Delete operations (id provided) -->
    <page path-info="/fr/service/resource/crud/([^/]+/[^/]+/(form/[^/]+|data/[^/]+/[^/]+))" matcher="oxf:perl5-matcher"
          default-submission="submission-service-resource.xml"
          model="persistence/resource/crud.xpl">
        <setvalue ref="/*/resource" matcher-group="1"/>
    </page>

    <!-- ==== Other Services ==== -->

    <!-- Generate HTML to be saved -->
    <page path-info="/fr/service/import-export/save-generate" view="import-export/save-generate.xpl"/>

    <!-- Custom services provided by the project -->
    <page path-info="/fr/service/custom/([^/]+)/([^/]+)" matcher="oxf:perl5-matcher"
          view="/forms/${1}/service/${2}.xpl"/>

    <epilogue url="oxf:/config/epilogue.xpl"/>

</config>
{'fraction_non_alphanumeric': 0.2232968881412952, 'fraction_numerical': 0.00798990748528175, 'mean_word_length': 2.644699872286079, 'pattern_counts': {'":': 0, '<': 203, '<?xml version=': 2, '>': 203, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 28}, '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': '3728954', 'n_tokens_mistral': 4717, 'n_tokens_neox': 4568, 'n_words': 871}