Reply
Cloudera Employee
Posts: 146
Registered: ‎08-21-2013

Re: Morphline XSLT not working as described

The xslt command fills in the XPath string value into the record field, as described in the doc.

Per the XPath spec, the XPath string value of an XML element is the string concatenation of all it's text nodes, and if there are no text nodes inside an element, as is the case in your example, the XPath string value is the empty string.

E.g. Try this to fill "This is a text node" into the "Child1" record field:


This is a text node




For more examples see the unit tests here: https://github.com/cloudera/cdk/tree/master/cdk-morphlines/cdk-morphlines-saxon/src/test