Edit report at http://bugs.php.net/bug.php?id=51897&edit=1

 ID:               51897
 Updated by:       rricha...@php.net
 Reported by:      rquadl...@php.net
 Summary:          LIBXML_NOWARNING does not suppress warnings when
                   passed to xinclude().
-Status:           Assigned
+Status:           Feedback
 Type:             Bug
 Package:          DOM XML related
 Operating System: Windows XP SP3
 PHP Version:      5.3.2
 Assigned To:      rrichards

 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

please submit a test case that doesnt require phpdoc to be pulled


Previous Comments:
------------------------------------------------------------------------
[2010-05-24 12:35:56] rquadl...@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: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 this bug report at http://bugs.php.net/bug.php?id=51897&edit=1

Reply via email to