|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45892 $dom_xml->relaxNGValidate()
Submitted: 2008-08-22 10:09 UTC Modified: 2008-08-25 13:25 UTC
From: mangal dot varshney at gmail dot com Assigned:
Status: Not a bug Package: DOM XML related
PHP Version: 5.2.6 OS: Windows/Linux
Private report: No CVE-ID: None
 [2008-08-22 10:09 UTC] mangal dot varshney at gmail dot com
I am trying to validate a DocBook having namest and nameend attribute in entry element with RelexNg ( I am using following php code for validation. It is displaying errors in xml file but xml file (DocBook) is valid. I have checked this XMl file on some tool whixh says it valid like oXygen.
$dom_xml = new DomDocument;
if ($dom_xml->relaxNGValidate("docbook.rng") )
               echo "Good\n";
    echo $php_errormsg . "\n";

I am attaching sample DocBook in the mail.

Reproduce code:
XML File (DocBook) file:

<?xml version="1.0" encoding="UTF-8"?>
<book xmlns="" xmlns:xlink="" version="5.0">
        <title>Book Template Title</title>
            <orgname>Organization Name</orgname>
        <title>First Part</title>
        <subtitle>Subtitle of First Part</subtitle>
            <title>Chapter Title</title>
            <subtitle>Subtitle of Chapter</subtitle>
             <table frame="none">
                    <tgroup cols="2">
                        <colspec colname="c1" colnum="1"/>
                        <colspec colname="c2" colnum="2"/>
                                <entry namest="c1" nameend="c2">Header 1</entry>
                <title>Section1 Title</title>
                <subtitle>Subtitle of Section 1</subtitle>

Expected result:
It should be Good.

Actual result:
Displaying Errors.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-22 15:10 UTC]
Try a newer version of libxml2. It works fine when I test it
 [2008-08-22 16:03 UTC] mangal dot varshney at gmail dot com
I am using libxml2.6.32. can you suggest me that on which libxml version you have checked ?

libXML support 	active
libXML Version 	2.6.32
libXML streams 	enabled
 [2008-08-22 16:40 UTC]
Please add a link to your phpinfo as well show the errors you are 
It is testing fine for me using various libxml2 versions (.30 up to 
current CVS) as well as different OS's
 [2008-08-22 16:58 UTC] mangal dot varshney at gmail dot com
PHP Info

Getting Following Error:

Element book has extra content: info
 [2008-08-25 13:25 UTC]
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 as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Dec 04 02:01:23 2020 UTC