xslt - extract leaf nodes

xml, xslt

Solution

SELECT="*[not(*)]"

Should give you anything without a child.

Problem

I want to extract only the leaf nodes from an XML document (i.e., only elements that have no children). Has anyone written an xslt to do this?

Original source