all groups > dotnet xml > july 2003 >
You're in the

dotnet xml

group:

Blank lines inserted when XSLT output inside a loop


Blank lines inserted when XSLT output inside a loop Jim
7/30/2003 10:33:46 AM
dotnet xml:
When output from inside a loop

<xsl:for-each select="Comment">
<br><xsl:value-of select="Line" /></br>
</xsl:for-each>

A blank line is inserted between each line, when I
remove the <br> then everthings on the same line. Want a
new line but getting 2 new lines instead, how can this be
fixed so just get 1 new line ?

Re: Blank lines inserted when XSLT output inside a loop Oleg Tkachenko
7/30/2003 9:20:37 PM
[quoted text, click to view]

<xsl:for-each select="Comment">
<br /><xsl:value-of select="Line" />
</xsl:for-each>

or

<xsl:for-each select="Comment">
<xsl:value-of select="Line" /><br />
</xsl:for-each>

--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel
Re: Blank lines inserted when XSLT output inside a loop Anders Borum
7/31/2003 12:02:51 PM
Or my favourite for formatting ..

<xsl:for-each select="Comment">
<xsl:value-of select="Line" />

<!-- ## ADD LINEBREAK FOR ALL BUT THE LAST ENTRY -->
<xsl:if test="position() != last()">
<br />
</xsl:if>
</xsl:for-each>


--
venlig hilsen / with regards
anders borum
--

RE: Blank lines inserted when XSLT output inside a loop lukezhan NO[at]SPAM online.microsoft.com (
8/1/2003 2:10:58 AM
Hi Jim,

Oleg posted some very good information, does these not resolve the problem?
You may post your complete XML and XSLT file and code you use to perform
the transform here for clarifying the problem.

Luke

"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026?? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
http://www.microsoft.com/security/security_bulletins/ms03-026.asp and/or to
visit Windows Update at http://windowsupdate.microsoft.com to install the
patch. Running the SCAN program from the Windows Update site will help to
insure you are current with all security patches, not just MS03-026."
AddThis Social Bookmark Button