Solved

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

Posted on 2008-10-21
2
1,009 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
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.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

821 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