xslt 2.0 - apply templates select substring-after -
i've below xml line.
<toc-title>1. <content-style>short title</content-style></toc-title>
here wanted apply templates on substring-after 1.
i tried below xslt.
<xsl:template match="toc-title/text()" mode="x"> <xsl:analyze-string select="substring-after(.,' ')" regex="([a-z]+)"> <xsl:matching-substring> <xsl:apply-templates select="regex-group(1)" mode="x"/> </xsl:matching-substring> <xsl:non-matching-substring> <xsl:value-of select="."/> </xsl:non-matching-substring> </xsl:analyze-string> </xsl:template> <xsl:template match="text()" mode="x"> </xsl:template>
but when run throws below error.
xslt 2.0 debugging error: error: file:///c:/users/u0138039/desktop/flphk_chap.xsl:239: not node item - item has type xs:string value 'title' - details: - xtte0520: result of evaluating 'select' attribute of <xsl:apply-templates> instruction may contain nodes
i'm, unable how this. please me on fixing it.
thanks
Comments
Post a Comment