xml - How can I add line break into text that I am creating with XSLT? -
i trying create text output xml file using xslt. xslt creates sql code. here part outputs create table statements:
create table dbo.[<xsl:value-of select="@physicalname"/>] ( <xsl:for-each select="entityattributes/entityattribute"> <xsl:apply-templates select="attributes/attribute[@attributeid = current()/@entityattributeid]"/> ... </xsl:for-each>)
i want have line break after "(" in first line cannot manage find out how so. can help?
if put
<xsl:text> </xsl:text>
in xslt give line break. not clear wish put this. guessing want:
<xsl:text>create table dbo.[</xsl:text><xsl:value-of select="@physicalname"/><xsl:text>] ( </xsl:text>
in general should wrap text output in ... looks horrid in xsl preserves spacing. note can break lines in xslt without affecting result - e.g.
<xsl:text>create table dbo.[</xsl:text> <xsl:value-of select="@physicalname"/> <xsl:text>] (
</xsl:text>
and yes, agree explicit line break character. can see xslt not readable gets right answer
Comments
Post a Comment