Hi,
i noticed that XML::LibXSLT is not transforming xml documents correctly
when i install a XML::LibXML > 1.31
The problem is, that empty text-nodes get stripped from the xml document
used for the transformation.
In LibXML.xs the default for xmlKeepBlanksDefaultValue is set this way
in LibXML_init_parser:
item = hv_fetch( real_obj, "XML_LIBXML_KEEP_BLANKS", 22, 0 );
xmlKeepBlanksDefaultValue = item != NULL && SvTRUE(*item) ? 1 : 0;
This sets the default value to 0 if you didn't call the keep_blanks(1)
method of the parser object. IMHO the correct behavior should be more
like this:
if (item != NULL) {
xmlKeepBlanksDefaultValue = SvTRUE(*item) ? 1 : 0;
} else {
xmlKeepBlanksDefaultValue = 1;
}
The same goes for xmlSubstituteEntitiesDefaultValue and perhaps it would
saver to implement the setting for the values that default to 0 the same
way.
In the current form you end up with default configuration for the parser
which are not described in the Manual.
Why i posted this to AxKit Devel?
I happend onto this because we do some magic with text-nodes containing
only Whitespaces and carriage returns in our xslt Transforms with AxKit.
Installing the new LibXML did break a number of pages.
This can be fixed for the time beeing in LibXSLT.pm coming with AxKit by
setting keep_blanks for the parser object in the handler Function.
Perhaps AxKit should allow some setting of these parameters via
configuration parameters in http.conf.
thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]