1

How to pass carat character "^" as a parameter in XSLT

Below line tries to call a template but I'll get an error which is "unexpected token '^' in the expression"

<xsl:call-template name="tokenizeString">
    <xsl:with-param name="list" select="sg[@ty='TST']/fs/f[@ix='5']/vl"/>
    <xsl:with-param name="delimiter" select="^"/>
</xsl:call-template>

This is some part of my data and I need to split it TEST12^Dr K Test^^^^^^^LAB^^^^DN^GOS&TFHS Hospital

My template is:

<xsl:template name="tokenizeString">
    <xsl:param name="list"/>
    <xsl:param name="delimiter"/>
    <!--  body of template -->
</xsl:template> 
4

1 回答 1

2

尝试更改以下代码行

<xsl:with-param name="delimiter" select="^"/>

<xsl:with-param name="delimiter" select="'^'"/>

或者

<xsl:with-param name="delimiter" select="'&#94;'"/>
于 2018-01-11T07:33:37.170 回答