View Single Post
  #3 (permalink)  
Old September 5th, 2019, 05:33 AM
msambasiva@gmail.com msambasiva@gmail.com is offline
Registered User
Points: 44, Level: 1
Points: 44, Level: 1 Points: 44, Level: 1 Points: 44, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2017
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
Default

As I am a beginner of XSLT, bit confused with your suggestion..Can we have control to merge and split the content with in template? How can the content be merged after removal of single line comments in a template. Do we need to define a new template to handle merge and split?
Below is the sample code where I struck to merge and split for multiline comments.

<xsl:template match="query/query">
<xsl:choose>
<xsl:when test="contains(.,'--')">
<xsl:if test="normalize-space(substring-before(.,'--')) ne ''">
<xsl:value-of select="substring-before(.,'--')"/><BR/>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/><BR/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Could you suggest with sample psuedo code?
Reply With Quote