File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes XSL - wierd problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XSL - wierd problem" Watch "XSL - wierd problem" New topic

XSL - wierd problem

Brendan Kennedy
Ranch Hand

Joined: May 02, 2001
Posts: 65
Ok, here's a wierd one for ya -
<xsl:when test="REVENUE/FARE/LOC_CUR=''">-</xsl:when>
This puts a '-' in every result containing a '0'. I just want it to put it in if there is no info within the tags in the xml.
Brendan Kennedy
Ranch Hand

Joined: May 02, 2001
Posts: 65
And the answer is :
<xsl:when test="not(string(REVENUE/PAX_NUM))">-</xsl:when>
with whatever node I put in the origonal post inside the string brackets..
It is sorta covered in the JavaRanch Style Guide.
subject: XSL - wierd problem
Similar Threads
Getting my HTML output to backspace one character
xsl - differentiating nodes
Reusing code in xsl
NBSP in Html output
xsl:if and XPath