Yesterday I figured out how to process form input. Today I figured out how to parse strings into nodes in eXist. This is very eXist specific, but briefly:
let $doc := "<html xmlns='http://www.w3.org/1999/xhtml'>
<div>
foo
</div>
</html>"
let $list := util:catch('*',
(util:parse($doc)),
($util:exception-message))
return
$list
I'll need this for posts and comments. There's also a parse-html
function but it's based on the flaky NekoHTML instead of the m,orereliable TagSoup.