Reputation: 3241
I add new line character ' ' between two string in xslt file like this:
test test1
Output is just like this:
test
test1
But I want output to be just like this:
test test1
Is that possible in xslt?
I think I should talking about why I want this:
the first output doesn't make effect in excel's Alt + Enter's. But when I manually edit xml like output2, it works. also doesn't work.
Extra Explaination
Let's imagine 'test test1' is written inside an excel cell. When i use Alt + Enter inside this and open file with notpead++, i see this cell like this:
test test1
In xslt file I try to replace all "newline" text with " " to make this effect. But when I open this output in notpead i see that:
test
test1
but I want output to be like that:
test test1
Upvotes: 2
Views: 19480
Reputation: 36
If we are manipulating some xml nodes via templates then we can implement like ...
<xsl:template match="node">
<xsl:text>Package: </xsl:text>
<xsl:value-of select="childNode"/>
<xsl:text> available from </xsl:text>
<xsl:value-of select="OtherchildNOde"/>
<xsl:text><br/> </xsl:text>
</xsl:template>
so main thing is [ <br/> ]. we can use p tag instead of br tag also.
Upvotes: 2
Reputation: 172428
Try something like this:-
<xsl:text>test test1 </xsl:text>
Upvotes: 4