#45892 [Fbk->Bgs]: $dom_xml->relaxNGValidate()
| From: | rrichards@php.net | Date: | Mon, 25 Aug 2008 13:25:08 +0000 |
| Subject: | #45892 [Fbk->Bgs]: $dom_xml->relaxNGValidate() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-128379@lists.php.net to get a copy of this message | ||
ID: 45892
Updated by: rrichards@php.net
Reported By: mangal dot varshney at gmail dot com
-Status: Feedback
+Status: Bogus
Bug Type: DOM XML related
Operating System: Windows/Linux
PHP Version: 5.2.6
New Comment:
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. 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.
Previous Comments:
------------------------------------------------------------------------
[2008-08-22 16:58:39] mangal dot varshney at gmail dot com
PHP Info
http://www.epubnow.com/ePubNowWeb/phpinfo.php
Getting Following Error:
Element book has extra content: info
------------------------------------------------------------------------
[2008-08-22 16:40:49] rrichards@php.net
Please add a link to your phpinfo as well show the errors you are
getting.
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:03:50] 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 15:10:35] rrichards@php.net
Try a newer version of libxml2. It works fine when I test it
------------------------------------------------------------------------
[2008-08-22 10:09:21] mangal dot varshney at gmail dot com
Description:
------------
I am trying to validate a DocBook having namest and nameend attribute
in entry element with RelexNg
(http://docbook.org/xml/5.0/rng/docbook.rng). 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;
$dom_xml->load("textExample.xml");
if ($dom_xml->relaxNGValidate("docbook.rng") )
{
echo "Good\n";
}
else
{
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="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="5.0">
<info>
<title>Book Template Title</title>
<author>
<orgname>Organization Name</orgname>
<address>
<city>City</city>
<street>Street</street>
<postcode>000000</postcode>
<country>Country</country>
</address>
<email>user@example.com</email>
</author>
</info>
<part>
<title>First Part</title>
<subtitle>Subtitle of First Part</subtitle>
<chapter>
<title>Chapter Title</title>
<subtitle>Subtitle of Chapter</subtitle>
<table frame="none">
<title>Table1</title>
<tgroup cols="2">
<colspec colname="c1" colnum="1"/>
<colspec colname="c2" colnum="2"/>
<thead>
<row>
<entry namest="c1" nameend="c2">Header
1</entry>
</row>
</thead>
<tbody>
<row>
<entry/>
<entry/>
</row>
<row>
<entry/>
<entry/>
</row>
<row>
<entry/>
<entry/>
</row>
</tbody>
</tgroup>
</table>
<sect1>
<title>Section1 Title</title>
<subtitle>Subtitle of Section 1</subtitle>
<para>Text</para>
</sect1>
</chapter>
</part>
</book>
Expected result:
----------------
It should be Good.
Actual result:
--------------
Displaying Errors.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45892&edit=1