php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47446 Error docdocument::schemaValidate a valid schema
Submitted: 2009-02-19 08:18 UTC Modified: 2009-02-19 12:29 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: apaella at gmail dot com Assigned:
Status: Not a bug Package: DOM XML related
PHP Version: 5.3.0beta1 OS: WIN XP PRO
Private report: No CVE-ID: None
 [2009-02-19 08:18 UTC] apaella at gmail dot com
Description:
------------
Trying to validate a valid XML (AltovaXML commandline & Liquid XML Studio says that) I got a "local complex type:The content type
must specify a particle." error... 

Reproduce code:
---------------
$xmlString= '<?xml version="1.0"?>
<OTA_AirAvailRQ xmlns="http://www.opentravel.org/OTA/2003/05"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    TimeStamp="2009-02-18T16:24:59" MaxResponses="5"
Target="Production"
    Version="2008.02" SequenceNmbr="1" EchoToken="960"
    xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05
                        http://www.opentravel.org/2008B/OTA_AirAvailRQ.xsd">
    <POS>
        <Source PseudoCityCode="IPCC" />
    </POS>
    <OriginDestinationInformation>
        <DepartureDateTime>2009-03-10T20:00:00</DepartureDateTime>
        <OriginLocation LocationCode="TNR" />
        <DestinationLocation LocationCode="OLB" />
    </OriginDestinationInformation>
    <TravelPreferences MaxStopsQuantity="2" />
</OTA_AirAvailRQ>';

$xdoc = new DomDocument();
$xdoc->loadXML($xmlString);
$xdoc->schemaValidate("http://www.opentravel.org/2008B/
OTA_AirAvailRQ.xsd"); 

Expected result:
----------------
A "valid schema" result

Actual result:
--------------
Warning : "local complex type:The content type
must specify a particle."

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-19 10:59 UTC] apaella at gmail dot com
updated libxml to version 2.7.3 and fixed.
sorry for my mistake
 [2009-02-19 12:29 UTC] rrichards@php.net
.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jul 03 12:01:30 2024 UTC