Hi Jonathan,
Could you provide us with a little step-by-step description that allows us to reproduce your use case?
Thanks in advance, Christian
Jonathan Robie jonathan.robie@gmail.com schrieb am Fr., 16. Juli 2021, 19:42:
I tried adding these options to .basex:
# Local Options CHOP = false SERIALIZER = indent=no
It still seems to be putting elements on individual lines, as above, and not just for elements that have been modified. Is there a way to prevent this?
Jonathan
On Fri, Jul 16, 2021 at 1:33 PM Jonathan Robie jonathan.robie@gmail.com wrote:
Hmmm, the original repo puts elements smack dab together on the same line to avoid whitespace issues, perhaps using CSS. When I do the update, it puts the updated elements on separate lines:
< <w lemma="1121 a" morph="HNcmsc" id="01PQe">בֶּן</w><seg type="x-maqqef">־</seg><w lemma="3967" morph="HAcbsa" id="01Exo">מֵאָ֥ה</w>
<w lemma="1121 a" morph="HNcmsc" id="01PQe">בֶּן</w> <seg type="x-maqqef">־</seg> <w lemma="3967" morph="HAcbsa" id="01Exo">מֵאָ֥ה</w>
Jonathan
On Fri, Jul 16, 2021 at 11:25 AM Jonathan Robie jonathan.robie@gmail.com wrote:
Yes, that is shorter and more readable. Thanks!
And if I don't have to worry about setting options, that's nicely convenient. Again, thanks!
Jonathan
On Fri, Jul 16, 2021 at 8:53 AM Christian Grün < christian.gruen@gmail.com> wrote:
Thanks, Jonathan, for the code snippet.
replace value of node $ketiv/@type with
fn:string-join(($ketiv/@type, "x-ketiv"), " ")
This statement should be completely safe, no matter which options you have set. If you want to avoid if/then/else, you can also do the following (but it’s not much shorter):
delete node $ketiv/@type, insert node attribute type { string-join(($ketiv/@type, "x-ketiv"), " ") } into $ketiv