On Mon, Apr 11, 2022 at 09:27:13PM +0200, Markus Elfring scripsit:
Do you find the item “Query” still relevant for further displays?
Sure!
The teaching use is to compare the Query, …
How much do care that the display for the item “Query” would be equivalent to the original XQuery script (including special characters like line breaks)?
Not at all.
U+000A LINE FEED is one of three control characters allowed in XML. It's inherently special, but it's also white space, and white space is not important. The query itself is not in and must not be in a presentation format where white space has semantic meaning. (Both of those are teachable moments, especially for people whose academic training involved a lot of python.)
If the Query return has been rendered on a single line, well, XML doesn't consider white space significant, and a few reminders of that do no harm.
I suggest to reconsider such a view also a bit more.
I've been doing mostly document-representation XML processing for twenty-odd years now. There is no business case for pretty, stable indents, or semantic white space in XML or XQuery.
People do have strong presentation preferences, but those need to be something managed by a presentation layer, not considered an aspect of the code expression. Especially not a code expression internal to the processor which is being exposed as debugging information. (I say this as someone who configures editors to make punctuation a different colour than letters, and digits a different colour than either.)
The BaseX GUI is extremely lightweight as a matter of conscious design intent; it's not going to take on features that allow a highly configurable presentation layer. This is not to say I don't wish oXygen had out-of-the-box integration with BaseX; I do. But I also have to recognize that the tools I'm using (in the BaseX GUI case) are specifically designed to be minimalist and specifically designed to not care about white space in the XML case because that was a design decision about XML back in the bright beginning.