[xslt] expand entities in xsltParseStylesheetFile?



Hi,

I'm currently having a look a the php libxslt wrapper in the domxml
module.

One problem I found, is that entities used in stylesheets are not
properly expanded.
The wrapper for creating a stylesheet object from a file simply
calls xsltParseStylesheetFile(file); without making sure, that
xmlSubstituteEntitiesDefault(1) is called before.

Now, while this is easy to fix in the wrapper, I would like to ask,
if this shouldn't be done in xsltParseStylesheetFile itself, since
either a stylesheet contains no entities (in which case it should
not make a difference) or they must be substituted anyway, to get 
correct results. So parsing a stylesheet without this option does
not make much sense. Or did I miss something?


Second, I wrote a xsltSaveResultToString function which serialises
a result tree to memory, in order to add a output_string method to
the stylesheet object, which serialises the result tree according to
the declarations in the stylesheet (currently the wrapper only allowes
to serialise to html or xml without taking the stylesheet into account).
I still have to discuss that with the maintainer of the domxml php module
(he won't have time for this until june), but I think the 
xsltSaveResultToString function should go to libxslt. It's not a big deal, 
but it might be useful elsewhere as well.
So Daniel, would you accept a patch?

greetings
	Morus



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]