Michael Kay wrote:
> The correct behavior defined in the XSLT spec is:
> * with xsl:output method="text", all element nodes in the result tree are
> ignored, the serialized output file will contain only the content of the
> text nodes in the result tree
> * with xsl:output method="html", a ">" character will be output as ">";
> the only way to output tags is by creating element nodes on the result tree.
> (Unless you cheat using disable-output-escaping).
OK, so Sablotron has a bug here. I'll report it to them.
> To generate a format such as PHP, which is HTML-like but not pure HTML, the
> ideal approach would be to write your own serializer, which you could do by
> subclassing one of the Saxon serializers. This isn't as difficult as it
> might sound, and gives you complete control over how the result tree is
> represented in the final output file.
This certainly sounds interesting. Are there references available on how
to do this?