Hi, 

I have an issue with spaces in mixed content, when applying the xslt:transform command. I have been working around it for months with a hack in my css that puts the spaces back as   on inline elements, yet I still haven't run upon a clue to help me resolve this for good the clean way.

IN SUMMARY
IN DETAILS

I have mixed content in a file. Ex. <p>Text <i>italic</i> more text.</p>.

I have this function:;

declare %rest:path("/how2-html-topic/{$id}/{$menu-id}")

   %rest:GET

   function topic:html-get-how2-topic($id as xs:string, $menu-id as xs:string) as node()*{

    let $x := topic:xml-get-how2-topic($id)

    let $params := map{ "menucontext" := $menu-id}

    let $stylesheet := doc(concat($app:xslt_html_topic, 't'))

    return xslt:transform($x, $stylesheet, $params)

};


My access a web page runs this query. Result (lost spaces): <p>Text<i>italic</i>more text.</p>
If I get the same content without applying the xslt:transform, I get the xml with all the right spaces:

declare %rest:path("/how2-html-topic/{$id}/{$menu-id}")
   %rest:GET
   function topic:html-get-how2-topic($id as xs:string, $menu-id as xs:string) as node()*{
    let $:= topic:xml-get-how2-topic($id)
    let $params := map"menucontext" := $menu-id}
    let $stylesheet := doc(concat($app:xslt_html_topic, 't'))
    (: return xslt:transform($x, $stylesheet, $params) :)
    return $x
};

Maybe I am missing some config details for the xslt module, in BaseX? In XLST? My xslt sets the output as follow:

<xsl:output indent="yes" method="xml" encoding="UTF-8"/> 


Regards,

France
--
France Baril
Architecte documentaire / Documentation architect
france.baril@architextus.com
(514) 572-0341