Writing < in a CDATA section is not different from writing < outside. In both cases, you have a character < that belongs to a text node. I've not seen the stylesheet, but IMHO, libxslt is doing the right thing, by escaping < when generating a text node.
Ok well this shows my lack of understanding then :)
2.) What other options do I have to reach my goal? I've tried <xsl:text> but that (as I expected) didn't help.The cleanest way in your case is to use xsl:processing-instruction to create a PI.
Although it does seem like cheating, this could indeed work. According to http://www.w3schools.com/xsl/el_processing-instruction.asp (and various other pages I found on this element), if I'd write
<xsl:processing-instruction name="php">
$var = 0;
</xsl:processing-instruction>
that should produce
<?php
$var = 0;
?>
Unfortunately it seems that xsltproc makes that
<?php
$var = 0;
>
(notice the missing ? in the close tag of the PI). I've also tried putting in an xsl:text node around the $var = 0; but that didn't help. Am I reading the examples wrong or maybe doing something else wrong?
It should be closed as invalid.The bug report with the original stylesheet and the message that it didn't work can be found in the gnome bugzilla, see http://bugzilla.gnome.org/show_bug.cgi?id=168030. Thanks for any help in this.
Sorry what I meant was: 'see this bug for the original stylesheet'. It's not a bug report on libxslt, it's a bug report on gtkmm for which I'm trying to do this whole thing.
Thanks for your help.
cheers,
roel
_______________________________________________ xslt mailing list, project page http://xmlsoft.org/XSLT/ [email protected] http://mail.gnome.org/mailman/listinfo/xslt
