php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25948 XSLT_SABOPT_DISABLE_ADDING_META - if false generates invalid XML
Submitted: 2003-10-22 06:10 UTC Modified: 2003-10-22 21:08 UTC
From: phpdocs at pointbeing dot net Assigned:
Status: Not a bug Package: XSLT related
PHP Version: 4.3.2 OS: Red Hat Linux release 7.3 (Valha
Private report: No CVE-ID: None
 [2003-10-22 06:10 UTC] phpdocs at pointbeing dot net
Description:
------------
The XSLT_SABOPT_DISABLE_ADDING_META constant, set during compilation, automatically adds:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

to the output when it detects that the output is likely to be HTML. Problem is not the fact that it adds it - but that this line isn't actually valid XML - thus breaking the validity of any output! 


Reproduce code:
---------------
Occurs whenever xslt_process() is used to generate HTML output.

Examples -

XSL File:
http://www.pointbeing.net/wap2html/source.php?file=01.xsl

XML Source:
http://www.pointbeing.net/wap2html/tv01.wml


Expected result:
----------------
I would like to see valid XML generated, for example:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />



Actual result:
--------------
This is output automatically:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

This apparently cannot be disabled at runtime.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-22 12:47 UTC] phpdocs at pointbeing dot net
I should add that this occurs when the constant is set to 'false'.
 [2003-10-22 21:08 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

PHP only sets options, the actual addition is performed by the Sablotron library. Hence the bug is in it, not PHP.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 09:01:28 2024 UTC