This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Is Extra space in my XML causing a problem?
- To: xsl-list at mulberrytech dot com
- Subject: Is Extra space in my XML causing a problem?
- From: Matthew Cordes <mcorde61 at maine dot edu>
- Date: Fri, 9 Jun 2000 19:05:12 -0400
- References: <200006092029.QAA17702@mulberrytech.com>
- Reply-To: xsl-list at mulberrytech dot com
Brian,
I think You want normalize-space() section 4.2 of the xpath spec. Is it
similiar to java String trim() method, except that the number of spaces
on each side of non whitespace data is reduced to 1 space, e.g.:
normalize-space( ' aaaa ')
would return: ' aaaa '
-matt
> ------------------------------
>
> Date: Fri, 09 Jun 2000 10:40:59 -0400
> From: "Brian Burridge" <brian_burridge@coxtarget.com>
> Subject: Is Extra space in my XML causing a problem?
>
> I am trying to suppress a column in XSL (if the values is 'null'), but
> the text I'm comparing to isn't ever matching. This used to work when my
> XML tags were wrapped around the data, but now that I'm using a third
> party app (XML Lightweight Extractor) to generate my XML, it
> automatically puts extra space (as seen below) around the values, and
> the XSL is no longer matching.
>
> XSL:
> <xsl:if test="go_live_date!='null'">
> <td><xsl:value-of select="go_live_date" /> </td>
> </xsl:if>
>
> XML:
> <project>
> <number>
> 1104
> </number>
> <title>
> Title
> </title>
> <department>
> 0
> </department>
> <priority>
> 1
> </priority>
> <description>
> Test
> </description>
> <go_live_date>
> null
> </go_live_date>
> <status>
> A
> </status>
> </project>
> - --
>
> Brian N. Burridge
> Internet Architect
> (727) 399-3000 Ext 3515
> The Internet Group - ITSS
> Cox Target Media
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list