Gowtham
Gowtham

Reputation: 395

MarkLogic XSLT transformer does not transform properly

I invoked below transformation query to transform the XML with XSLT.

xdmp:xslt-invoke("example.xsl", $doc, (), ())

example.xsl contains below contents.

 <xsl:template match="CaseRef">
 <xsl:variable xmlns:encoder="xalan://java.net.URLEncoder" name="urlEncodedCit"
         select="encoder:encode( substring( string(@href),2))"/>
<xsl:value-of select="$urlEncodedCit"/>
</xsl:template>

But the MarkLogic Query Console does not transform properly. It seems to me that, the file is not transformed correctly.

But the transformation is working in saxonEE and Xalan.

Can anyone help me to solve this issue?

Thanks.

Upvotes: 0

Views: 369

Answers (1)

Michael Kay
Michael Kay

Reputation: 163595

Try replacing the call to java.net.URLEncoder with a call to the standard XPath 2.0 function escape-html-uri().

Upvotes: 3

Related Questions