One way to work around this is to create a transformation to remove the empty nodes.
For example, your process may have 5 input elements and 5 result elements. Your transformation may merely copy each input element to it's corresponding output element as shown here:
To work around this, create a transformation that has a source and target variable of your output variable. In this, add the following:
As you can see from the execution below, the first transformation essentially copied all input elements to their corresponding output result element, including the blank element result3. However, by applying a second transformation, all empty nodes are removed.
<xsl:if test=". != '' or ./@* != ''">
<xsl:apply-templates select="@*|node()" />