xsl-list
[Top] [All Lists]

Re: [xsl] Troubles with libxslt in PHP again: CDATA in <script>

2007-10-13 07:57:55
Hi,

On 10/13/07, Abel Braaksma <abel(_dot_)online(_at_)xs4all(_dot_)nl> wrote:
Hi Martynas,

Interesting how you seem to get spooky CDATA's... ;)

Thanks for running the stylesheet. Sorry that it didn't work out as
expected. However, a little google on "php_xsl.dll libxslt version"
shows that with PHP and libxslt you need another method to find out what
internal version is being used: phpinfo().

Oh, somehow I didn't think about it :) Here's what it says for 5.2.2 Win:
XSL     enabled
libxslt Version         1.1.17
libxslt compiled against libxml Version         2.6.26
EXSLT   enabled
libexslt Version        0.8.13

and for 5.2.5 Linux:
XSL     enabled
libxslt Version         1.1.11
libxslt compiled against libxml Version         2.6.16
EXSLT   enabled
libexslt Version        1.1.11

I wonder if they're using different versions for Win/Linux or did they
switch back to an older version...

The only way to find out what it causing your XSLT transformation to
behave quite radically different than what it is expected to do, is to
try it from the commandline without any external influences.

I agree, this way we might find out if it's libxslt fault or not. But
even if we do, there is not much to do about it since I have to use
PHP XSL (and what is compiled into it) anyway :)


Something starts to dawn here... Have you got, by any chance, a
statement similar to the following in your stylesheet?

   <xsl:output method="xml" cdata-section-elements="script" />

Because if you do, that's the cause of all your trouble.

No, I've never used this attribute.

As far as I remember the Content-Type metas issue, I ran my
stylesheets on standalone libxslt as well but got the same results as
with PHP XSL.

That is with method="html". Using method="xml" (or no specification,
which will default to html because you start with <html><head> etc) will
not output the content types at all.

But didn't we agree back then that there was a bug (non-conformant
behaviour) in libxslt? :)
I think we might just as well banging our heads on a similar libxslt
"feature" here. The "Preventing CDATA output in XHTML" thread also
makes me think so. Please take a look at it if you haven't yet :)

Martynas

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--