XSL or XSLT

1.Test if the value of a certain node is empty
Depends what you mean by empty.

  1. Contains no child nodes: not(node())
  2. Contains no text content: not(string(.))
  3. Contains no text other than whitespace: not(normalize-space(.))
  4. Contains nothing except comments: not(node()[not(self::comment())])

2. To match any node with no data.
example: <field1>data</field1> <field2> </field2> How do I match field2’s null. This should match any element that has no immediate text content (but I can’t speak for LotusXSL). Note that it will also match elements that have whitespace text content if the whitespace is stripped. If you want the element to have “no data” in the sense that it has no *descendant* text nodes you could try: <xsl:template match=”*[.=”]” >

1.Test if the value of a certain node is empty Depends what you mean by empty. Contains no child nodes: not(node()) Contains no text content: not(string(.)) Contains no text other than whitespace: not(normalize-space(.)) Contains nothing except comments: not(node()[not(self::comment())]) 2. To match any node with no data. example: <field1>data</field1> <field2> </field2> How do I match field2’s…

Leave a Reply

Your email address will not be published. Required fields are marked *