From: Jean-Paul R. <re...@gm...> - 2021-08-03 19:22:36
|
I use the following Xquery declarations to control output without any issue (....which I took directly from eXist's view.xql): declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization "; declare option output:method "html5"; declare option output:media-type "text/html"; And some of my outputs are generated in XSLT within Xquery like yours.... JPR On Tue, Aug 3, 2021 at 7:41 PM Christian Achter < chr...@ge...> wrote: > Dear community, > > I have a problem with an XQuery script that calls an XSLT script to > convert some XML from the eXist database to HTML. > > E.g. this XML > > <lb/> > > gets converted to this HTML > > <span class="br" data-lineNum="6"/> > > which is a self-closing <span /> tag. But <span> is not allowed to be a > self-closing tag <span ... /> in HTML. Instead it should be <span > ...></span> with no content, but the attributes as above. > > I tried several things. The XSLT is called from within an XQuery script, > so I declared in this XQuery file: > > declare option exist:serialize "method=xhtml > media-type=application/xhtml+html"; > > But still I get self-closing <span />-tags. > > How can I force the HTML part to be like this: > > <span class="br" data-lineNum="6"></span> > > ?? > > Thanks in advance and let me know if more information is needed. > > Kind regards > Christian > > > > > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > |