Solved

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

Posted on 2008-10-21
2
1,006 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
ID: 22769112
try:
<xsl:if test="Address!=''">
  <xsl:value-of select="Address1"/> <br />
</xsl:if>

Open in new window

0
 

Author Closing Comment

by:paulCardiff
ID: 31508388
bingo!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

867 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

18 Experts available now in Live!

Get 1:1 Help Now