I have an xslt stylesheet for importing an XML file. There is a loop in that is concatenating a child node called "Note". I'm trying to get each note node separated by a new line, but I can't figure out the character to enter. Thanks in advance for the help. Here's my code:
xslt
<xsl:if test="Note">
<xsl:call-template name="join">
<xsl:with-param name="list" select="Note" />
<xsl:with-param name="separator" select="';'" />
</xsl:call-template>
</xsl:if>
<xsl:template name="join">
<xsl:param name="list" />
<xsl:param name="separator"/>
<xsl:for-each select="$list">
<xsl:value-of select="." />
<xsl:if test="position() != last()">
<xsl:value-of select="$separator" />
</xsl:if>
</xsl:for-each>
</xsl:template>
XML Node:
<App action="A" id="65806">
<BaseVehicle id="6664"/>
<BodyType id="5"/>
<Note>Upgrade</Note>
<Note>replacement unit comes with a new dustcover / bumper assembly.</Note>
<Qty>2</Qty>
<PartType id="7584"/>
<Position id="30"/>
</App>
Expected Output
Currently...
Upgrade;replacement unit comes with a new dustcover / bumper assembly.
Trying to get it to look like...
Upgrade
replacement unit comes with a new dustcover / bumper assembly.
You still haven't shown us an XSLT we can run as is. I guess you want to change:
to:
or possibly (for Windows):