Solved

xsl -  if not empty, write out a <BR />

Posted on 2008-10-21
2
1,005 Views
Last Modified: 2013-11-18
have the following XSL

              <xsl:value-of select="Address1"/>
              <br />
              <xsl:value-of select="Town"/>
               <br />

However, if address1 or town is empty, i need to not have a <BR /> after it.

so i need to test to see if address1/town if not empty, and put the <BR> after it

something like
if <xsl:value-of select="Address1"/> not empty then
  <xsl:value-of select="Address1"/> <br />
end if

Thanks
0
Comment
Question by:paulCardiff
2 Comments
 
LVL 82

Accepted Solution

by:
hielo earned 500 total points
Comment Utility
try:
<xsl:if test="Address!=''">
  <xsl:value-of select="Address1"/> <br />
</xsl:if>

Open in new window

0
 

Author Closing Comment

by:paulCardiff
Comment Utility
bingo!
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
The viewer will learn how to count occurrences of each item in an array.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now