[MarkLogic Dev General] fn:normalize-space removing non-breaking spaces
joemfb at gmail.com
Fri Aug 10 13:55:46 PDT 2012
Any suggestions on where to turn for info on this question? Is this
something I should take up with support?
On Fri, Aug 3, 2012 at 3:12 PM, Joseph Bryan <joemfb at gmail.com> wrote:
> I have a collection of XML files that incorrectly includes whitespace
> to wrap and indent lines inside of text nodes. I've been working on
> normalizing this XML, and in the process, I noticed that
> fn:normalize-space() is treating non-breaking spaces ( ) as
> The function documentation
> (http://www.w3.org/TR/xquery-operators/#func-normalize-space) states
> that fn:normalize-space() uses the whitespace definition of XML
> metasymbol S (http://www.w3.org/TR/REC-xml/#NT-S), which doesn't
> include the non-breaking space. I tested with both xquery version 1.0
> and 1.0-ml, and found no difference.
> Is this behavior intentional, or might this be a bug?
> Sample code:
> let $string := fn:concat("   ", "this is
> a  test", "  ")
> fn:concat("START|", $string, "|END"),
> fn:concat("START|", fn:normalize-space($string), "|END")
More information about the General