since domxsltstylesheet process always returns a wellformed xml domdocument no matter what output method was declared in xsloutput and similar attributeselements its of not much use if you want to output html 4 or text data this function on the contrary honors xsloutput methodhtml _ bar _ text and other output control directives see the example for instruction of how to use it 