Hello.
I have a bug with BaseX version 10 and higher related to handling whitespaces in documents with mixed content elements.
I'm working with narrative documents (TEI).
Following the instructions in the documentation about this type of documents (containing mixed elements) I have disabled the indentation and the STRIPWS option.
When I execute queries with connection to the database, the result is as explained in the documentation (blanks are preserved).
However, when I use the BaseX libraries to execute queries in a local context (without a connection to the database) the spaces are sometimes removed.
Same error if I run the query in the Database Administration interface.
Query:
db:option('stripws')
Result:
false
Query:
db:option('serializer')
Result:
map{"omit-xml-declaration":"yes","binary":"yes","method":"basex","use-character-maps":"","tabulator":"no","allow-duplicate-names":"no","media-type":"","doctype-public":"","escape-uri-attributes":"no","standalone":"omit","csv":map{"lax":true(),"backslashes":false(),"separator":"comma","allow":"","header":false(),"quotes":true(),"format":"direct"},"indents":2,"json-node-output-method":"xml","json":map{"escape":true(),"strings":false(),"lax":false(),"indent":(),"format":"direct","merge":false()},"doctype-system":"","item-separator":(),"indent":"no","suppress-indentation":"","byte-order-mark":"no","include-content-type":"yes","encoding":"UTF-8","newline":"\n","normalization-form":"none","html-version":"","version":"","limit":-1,"undeclare-prefixes":"no","cdata-section-elements":"","parameter-document":""}
Query:
let $doc := <doc><entry><sense id='1'><def>Gente grosera o vulgar.</def><cit><quote><seg>La</seg> <oRef>chusma</oRef>.</quote></cit></sense></entry></doc>
return $doc/entry//sense[@id = '1']
Result:
<sense id="1"><def>Gente grosera o vulgar.</def><cit><quote><seg>La</seg><oRef>chusma</oRef>.</quote></cit></sense>
The whitespace contained between the </seg> and <oRef> tags has been stripped.
In version 9.3.5 this problem did not occur.
Can you please have a look at this? In a TEI document whitespaces are important.
Thanx in advance,
Montse.
___________________________________________
NOTA LEGAL
El contenido de este mensaje de correo electrónico, incluidos los ficheros adjuntos, es confidencial y está protegido por el artículo 18.3 de la Constitución española, que garantiza el secreto de las comunicaciones. Si usted recibe este mensaje por error, le rogamos que se ponga en contacto con el remitente para informarle de este hecho y no difunda su contenido ni haga copias. La Real Academia Española informa de que los datos que en esta comunicación figuran, así como los que mantiene de usted y/o de su empresa, son tratados con la finalidad de mantener el contacto, así como de realizar las gestiones que en esta aparecen, y son utilizados de forma autorizada por las partes y sin cederse a terceros ajenos. Puede ejercer sus derechos a través de proteccion_de_datos@rae.es. Puede obtener más información sobre protección de datos en nuestra página web o contactando directamente con nosotros (Reglamento UE 2016/679).