xsl-list
[Top] [All Lists]

RE: Not Node() but string onlye

2005-01-08 10:14:19
 

I am using this:
<xsl:when test="not(node()) and string(.)">

To test if a node has "No Child Nodes" but contains "String only".

If an element has no children, then its string value will always be "".

So example:

<!-- This should FAIL above test -->
<mynode>
    I hope
</mynode>


Perhaps you are overlooking that the element <mynode> has one text node
child.

Michael Kay
http://www.saxonica.com/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>