I am using a rather old verision of exist at work. I’d love to update it, but unfortunately were are too small and I am to junior to get this done anytime in the next few months.
Anyway, I rewriting some document table of contents. I would like to output an empty span tag that has an icon, unforunately that is not working correctly.
Here is a brief snippet using Xquery 1.0
else if ( $section/name()= 'body') then
<h3><span class="ui-icon ui-icon-circle-triangle-e"></span>
Body
</h3>
This transforms to the following
HTML
<h3>
<span class="ui-icon ui-icon-circle-triangle-e"/>
Body
</h3>
which is again misintrerpted by the browsers(chromium/firefox) I am testing in to the following:
<h3>
<span class="ui-icon ui-icon-circle-triangle-e">
Body
</span>
</h3>
The Text should not be wrapped in the span tag, it should precede it as an icon.
I don’t know exist but I’d try something like
or similar. You might also look for some way to control the serialization globally.