I want to transform a Xerces DOM tree using Xalan.
It generally works fine, except when i have nodes with empty strings in the tree.
These nodes are created with createTextNode(0), and i need that for my application.
When my tree has such 'empty' node, it fails in XSLTEngineImpl::cloneToResultTree on the assert that 0 != length(data)
That looks like this bug : https://issues.apache.org/jira/browse/XALANJ-1888 for XalanJ but i found nothing for this problem on XalanC.
Is it a wanted behaviour ? Is there a workaround ? and if not should i fill a bug report for XalanC ?
I attach a small source file to reproduce this behaviour with a xsl file.
I've tested with Xerces-C++ 2.7.0 and Xalan-C++ 1.9.0 and 1.10.0.
Thanks for your answers,
Adrien de Sentenac
testxalan.cpp
Description: Binary data
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:template match="/"> <xsl:for-each select="foo"><xsl:apply-templates/></xsl:for-each> </xsl:template> </xsl:stylesheet>