Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify conf.xml #3062

Open
duncdrum opened this issue Oct 21, 2019 · 8 comments
Open

modify conf.xml #3062

duncdrum opened this issue Oct 21, 2019 · 8 comments
Labels
enhancement new features, suggestions, etc. needs documentation Signals issues or PRs that will require an update to the documentation repo
Milestone

Comments

@duncdrum
Copy link
Contributor

duncdrum commented Oct 21, 2019

What is the problem

conf.xml still has a few linline holdouts. These are tricky to process via standard xsl/xquery and unnecessarily complicate hand-off configuration of exist. A boolean @enablded attribute would be easier to process, and to read.

What did you expect

Easy modability of conf.xml using standard xml tricks.

First step

  • add @enabled to conf schema , uncomment all inlines and set to @enabled="false"
  • go through elements defined in schema and check if they should get the new attribute
  • make sure exist understands the meaning of @enabled="false|true" wherever it was added in step 1.

next…

consider if modules need to be loaded via manual configuration at all, or if a beans.xml style cdi approach can improve this process further.

Context information

@duncdrum duncdrum added the enhancement new features, suggestions, etc. label Oct 21, 2019
@duncdrum duncdrum added this to the eXist-6.0.0 milestone Oct 21, 2019
@duncdrum duncdrum added the needs documentation Signals issues or PRs that will require an update to the documentation repo label Oct 21, 2019
@adamretter
Copy link
Contributor

Can you provide an example of an "inline" which is troublesome to you?

@dizzzz
Copy link
Member

dizzzz commented Oct 22, 2019

@duncdrum 's suggestion is to switch on/off functionality (e.g modules) with a flag, instead of putting configuration parts in XML comments.

@adamretter
Copy link
Contributor

@dizzzz I still don't understand what that would look like vs what it looks like currently

@dizzzz
Copy link
Member

dizzzz commented Oct 23, 2019

I think @duncdrum

<!--
<module uri="http://exist-db.org/xquery/spatial"
        class="org.exist.xquery.modules.spatial.SpatialModule"/>
-->

vs

<module uri="http://exist-db.org/xquery/spatial" 
        class="org.exist.xquery.modules.spatial.SpatialModule" enabled="no"/>

rationale: it is easier to switch on/off modules with e.g. an xslt script.

@duncdrum
Copy link
Contributor Author

yes similarly allow triggers to be enabled / disabled

                <!--<trigger class="org.exist.collections.triggers.XQueryStartupTrigger"/>-->

as well as

        <!-- 
        <job class="bar.foo.myjob" period="600000" delay="300000" repeat="10" />
        -->

and

<!--
                <feature name="http://xml.org/sax/features/external-general-entities" value="false"/>
                <feature name="http://xml.org/sax/features/external-parameter-entities" value="false"/>
                <feature name="http://javax.xml.XMLConstants/feature/secure-processing" value="true"/>
                -->

for consistencies sake i would also consider

<custom-filter class="org.exist.FirstFilter"/>
<backup-filter class="org.exist.FirstFilter"/>

@dizzzz
Copy link
Member

dizzzz commented Oct 23, 2019

<feature> is really different as these parameters are 1:1 set as "features" (key, value) the the SAXparsers...

@duncdrum
Copy link
Contributor Author

duncdrum commented Oct 23, 2019

@dizzzz we could also enable the wrapper Element. Or Uncomment but with reversed values from what is in there now. The main goal still being to get rid of inlines.

@duncdrum
Copy link
Contributor Author

Another inline hold up is the actual version of a conf.xml see this example

This is less than stellar, as copying a v3.3 conf.xml into e.g. a 5.2 instance might or might not lead to breakage. I suggest to add @version to the root <exist> element, so we can use xpath to determine the version of a given conf.xml file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new features, suggestions, etc. needs documentation Signals issues or PRs that will require an update to the documentation repo
Projects
None yet
Development

No branches or pull requests

3 participants