Notes on factors that influence whitespace in XQuery, with a focus on eXist 3.x
Notes in preparation for a blog post or article.
doc(), hc:send-request()) or file system (file:read(), xmldb:store-files-from-pattern())boundary-space strip|preserve (default is strip)serializer/@indent='yes'output:indent "yes|no" or exist:serialize "indent=yes|no"fn:serialize(), file:serialize(), response:serialize(), transform:transform()indent=yes, can be overridden in $EXIST_HOME/extensions/webdav/webdav.properties; see https://github.com/eXist-db/exist/blob/develop/extensions/webdav/webdav.properties and https://github.com/eXist-db/exist/blob/develop/extensions/webdav/src/org/exist/webdav/ExistResourceFactory.java#L65-L74boundary-space default setting, stripboundary-space strip and serializer indent=yes this can make a document appear as if it has whitespace, when it really doesn'tindent=yes can introduce whitespace; saving a document back into the database can result in extra whitespaceindent=no ever completely strip whitespace where it was, or does it just collapse whitespace to a single character?indent=yes ever insert whitespace where there wasn't any, or does it just expand existing whitespace?suppress-whitespace=leading|trailing|both|none or preserve-whitespace-mixed-content=yes|no) play? Under what scenarios does it affect the results of a query?