-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Disable xinclude processing in eXide's "download app" command #90
Comments
The code controlling how apps are downloaded is https://github.com/wolfgangmm/eXide/blob/develop/modules/deployment.xql#L574-L581. It's simply using the I see two routes, then, to a solution:
Option 2 seems pretty doable, and doesn't require a change to the eXist core. @awagner-mainz @jensopetersen @dizzzz Opinions? Is there any interest in taking this on? |
Actually the current behavior is |
@duncdrum, my experience was different from yours: it did not leave xincludes but replaced the xinclude statements with the included stuff. I will have to check if it is still this way in v3, but I will not have the time to do so in the next few days. If it is as you say, then the issue is already solved from my POV. |
@awagner-mainz ok I did another round of tests with a fresh 3.1 and yes my includes are being expanded, no clue what i did to my old 2.2. to not do this, but yes this is a problem. @joewiz Actually there are at least two problems:
|
Yikes! Thanks for confirming! I think we can give option 2 a try and see how it performs. I'll let you know when a patch / PR is ready to test. |
- exposes a new request parameter, expand-includes, which is now set to “false” by default but could be set to “true” by the application - closes #90
@awagner-mainz @duncdrum I've submitted a PR. The changes are pretty easy to apply if you just copy and paste the revised download this and rename it as xitest-0.1.xar In the process of testing this, I also discovered that when eXide executes queries (via Eval), there is no way to prevent it from expanding XInclude elements that are part of the result sequence. (Try running Eval on the xitest.xq file in the attached app package.) Running the same query outside the context of eXist (e.g., by opening http://localhost:8080/exist/apps/xitest/test.xq in its own browser tab) respects the serialization options in the query. I believe eXide's behavior here is a limitation of the XQueryServlet that eXide uses to pipe queries through to eXist for execution. A side effect of this same phenomenon is that if you open an XML file and insert an XQuery block into it, you'd expect eXide to return the XQuery block as a string, but it actually evaluates the XQuery. For example, starting a new XML file in eXide, entering |
@awagner-mainz @duncdrum Do you have any comments on this PR? If you would be able to test this to make sure that it works for the apps you needed it for, it would certainly give the reviewers confidence/impetus to merge it in. To try it out, you would just need to clone or download the branch with the work, https://github.com/wolfgangmm/eXide/tree/fix/download-app-xincludes. No rush. |
Moved from eXist-db/exist#403, where @awagner-mainz suggested (a) disabling expansion of XIncludes in eXide's "download app" or (b) at least have an option to turn off XInclude expansion, and added:
The text was updated successfully, but these errors were encountered: