Bug #51897 [Opn->Asn]: LIBXML_NOWARNING does not suppress warnings when passed to xinclude().
| From: | felipe@php.net | Date: | Sat, 12 Jun 2010 23:10:28 +0000 |
| Subject: | Bug #51897 [Opn->Asn]: LIBXML_NOWARNING does not suppress warnings when passed to xinclude(). | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-151402@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51897&edit=1
ID: 51897
Updated by: felipe@php.net
Reported by: rquadling@php.net
Summary: LIBXML_NOWARNING does not suppress warnings when
passed to xinclude().
-Status: Open
+Status: Assigned
Type: Bug
Package: DOM XML related
Operating System: Windows XP SP3
PHP Version: 5.3.2
-Assigned To:
+Assigned To: rrichards
Previous Comments:
------------------------------------------------------------------------
[2010-05-24 12:35:56] rquadling@php.net
Description:
------------
This issue is in relation to http://news.php.net/php.doc/969381854
Trying to standardise the documentation in relation to including class
synopsis,
I'm including constructor and destructor synopsis via an xinclude with
an
pointer and a xfallback...
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('class.datetime')/db:refentry/db:refsect1[@role='description']/desce
ndant::db:destructorsynopsis[not(@role='procedural')])">
<xi:fallback />
</xi:include>
As there is no destructor for datetime, the fallback is used (which is
empty).
All would seem to be well.
The problem is that the xinclude processing generates a warning when
using the
online documentation editor - but not when I run this locally via
phpdoc's
configure.
I've been supplied a test script (http://news.php.net/php.doc/969381870)
which
will generate the errors locally.
And so to the bug.
In the example the xinclude() call has no parameters.
Supplying LIBXML_NOWARNING does _NOT_ suppress the warnings.
To run the test script, you will need the doc-base/manual.xml file
produced by
running the doc-base/configure.php script (part of PHPDoc).
Test script:
---------------
<?php
$doc = new DOMDocument();
$doc->load('doc-base/manual.xml', LIBXML_NOENT);
var_dump($doc->xinclude(LIBXML_NOWARNING));
var_dump($doc->validate());
?>
Expected result:
----------------
int(-1)
bool(true)
Actual result:
--------------
Warning: DOMDocument::xinclude(): XPointer evaluation failed:
#xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('class.datetime')/db:refentry/db:refsect1[@role='description']/desce
ndant::db:destructorsynopsis[not(@role='procedural')]) in - on line 4
Warning: DOMDocument::xinclude(): XPointer evaluation failed:
#xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('class.datetimezone')/db:refentry/db:refsect1[@role='description']/d
escendant::db:destructorsynopsis[not(@role='procedural')]) in - on line
4
Warning: DOMDocument::xinclude(): XPointer evaluation failed:
#xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('class.dateinterval')/db:refentry/db:refsect1[@role='description']/d
escendant::db:destructorsynopsis[not(@role='procedural')]) in - on line
4
Warning: DOMDocument::xinclude(): XPointer evaluation failed:
#xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('class.dateperiod')/db:refentry/db:refsect1[@role='description']/des
cendant::db:destructorsynopsis[not(@role='procedural')]) in - on line 4
Warning: DOMDocument::xinclude(): XPointer evaluation failed:
#xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('class.dateperiod')/db:refentry/db:refsect1[@role='description']/des
cendant::db:methodsynopsis[not(@role='procedural')]) in - on line 4
int(-1)
bool(true)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51897&edit=1