From:             rquadling
Operating system: Windows XP SP3
PHP version:      5.3.2
Package:          DOM XML related
Bug Type:         Bug
Bug description:LIBXML_NOWARNING does not suppress warnings when passed to 
xinclude().

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:refsec...@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:refsec...@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:refsec...@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:refsec...@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:refsec...@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:refsec...@role='description']/des

cendant::db:methodsynopsis[not(@role='procedural')]) in - on line 4

int(-1)

bool(true)

-- 
Edit bug report at http://bugs.php.net/bug.php?id=51897&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=51897&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=51897&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=51897&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=51897&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51897&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=51897&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=51897&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=51897&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=51897&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=51897&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=51897&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=51897&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=51897&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=51897&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=51897&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=51897&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=51897&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=51897&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=51897&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=51897&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=51897&r=mysqlcfg

Reply via email to