This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The examples in section 5.6.5 fn:analyze-string start with: "The expression fn:analyze-string("The cat sat on the mat.", "\w+") returns <analyze-string-result xmlns="http://www.w3.org/2005/xpath-functions"> <match>The</match> <non-match> </non-match> <match>cat</match> <non-match> </non-match> <match>sat</match> <non-match> </non-match> <match>on</match> <non-match> </non-match> <match>the</match> <non-match> </non-match> <match>mat</match> <non-match>.</non-match> </analyze-string-result>." Not very readable. I suggest that you add: Indented for readability, this result is: <analyze-string-result xmlns="http://www.w3.org/2005/xpath-functions"> <match>The</match> <non-match> </non-match> <match>cat</match> <non-match> </non-match> <match>sat</match> <non-match> </non-match> <match>on</match> <non-match> </non-match> <match>the</match> <non-match> </non-match> <match>mat</match> <non-match>.</non-match> </analyze-string-result>
Probably makes sense. I was compromising here between the need for human readability and the desire to have as many of the examples as possible be automatically testable, since experience shows that examples that are not machine-testable are often wrong.
I have added an attribute fos:result normalize-space=true" to the function catalog schema to identify example results that need to be formatted with whitespace; I have added the relevant logic to the stylesheet; and I have used this mechanism to format these examples.