RE: [xsl] Conditional output for empty node value

Subject: RE: [xsl] Conditional output for empty node value
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Mon, 5 Feb 2001 17:19:34 -0000
> I have a basic problem I am using a xalan parser and not able to put a
> condition for empty node in my xsl.

You can test whether the current node has children by writing

test="node()"

You can test whether its string-value is non-empty by writing

test="string(.)"

Which test you use depends on how you want to handle comments, etc,
appearing within the element.

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread