I have this XSL code and I would like to configure the string. However I couldn’t get the configured string yet. What could be the matter?
<xsl:param name="topicId"></xsl:param>
<xsl:param name="topicName"/>
<xsl:attribute-set name="attrTopic">
<xsl:attribute name="id">
<xsl:value-of select="/message/file/@name[substring-after($topicId,'-')]"/>
</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="/message/file/@name[substring-before(' ',$topicId)]"/>
</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="attrVars">
</xsl:attribute-set>
$topicId comes from my Java file. in sum I am trying to convert this string “1010-Text” to “1010” and “Text” separately in XSL
If the context is correct and
$topicId='WordA-WordB'should get
WordBandshould get nothing.
While
shoud get
WordA.