Subject: Re: [xsl] Test existence of element From: "J.Pietschmann" <j3322ptm@xxxxxxxx> Date: Mon, 25 Mar 2002 22:42:00 +0100 |
Is it possible to test if a child (or grand-child) element of the current node exists (within an xsl:if or :when expression)? If so, how?
Test for the existence of a child element named "foo": <xsl:if test="foo"> Test for a grandchild: <xsl:if test="*/foo"> Background: The expressions select a node set, which is implicitely converted to boolean false if empty and boolean true if non-empty. Of course, you may also use test="count(foo) > 0" and similar expressions.
HTH J.Pietschmann
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Test existence of element, Ralph Holz | Thread | [xsl] XSL question, Manoj Jha |
[xsl] Test existence of element, Ralph Holz | Date | Re: [xsl] first occurance of node w, Wendell Piez |
Month |