|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-03-18 11:46 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2020-03-18 11:46 UTC] cmb@php.net
[2020-03-18 12:09 UTC] joao dot rebelo at pchouse dot pt
-Status: Feedback
+Status: Assigned
[2020-03-18 12:09 UTC] joao dot rebelo at pchouse dot pt
[2020-04-02 11:28 UTC] cmb@php.net
-Status: Assigned
+Status: Open
-Assigned To: cmb
+Assigned To:
[2020-04-02 11:28 UTC] cmb@php.net
[2020-06-05 16:45 UTC] joao dot rebelo at pchouse dot pt
-Status: Open
+Status: Closed
[2020-06-05 16:45 UTC] joao dot rebelo at pchouse dot pt
[2020-06-06 11:28 UTC] cmb@php.net
-Summary: Dom validate schema does not accepts tag <xs:assert
test="..." />
+Summary: Dom validate schema does not support XML Schema 1.1
-Status: Closed
+Status: Re-Opened
-Type: Bug
+Type: Documentation Problem
[2020-06-06 11:28 UTC] cmb@php.net
[2020-10-23 13:01 UTC] cmb@php.net
-Assigned To:
+Assigned To: cmb
[2020-10-23 13:02 UTC] phpdocbot@php.net
[2020-10-23 13:02 UTC] phpdocbot@php.net
-Status: Re-Opened
+Status: Closed
[2020-10-23 19:15 UTC] phpdocbot@php.net
[2020-12-30 11:58 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 00:00:02 2025 UTC |
Description: ------------ Dom validate schema does not accepts tag <xs:assert test="..." />, part of xsd <xs:sequence> <xs:element ref="TaxonomyReference"/> <xs:element name="Account" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="AccountID" type="SAFPTGLAccountID"/> <xs:element ref="AccountDescription"/> <xs:element ref="OpeningDebitBalance"/> <xs:element ref="OpeningCreditBalance"/> <xs:element ref="ClosingDebitBalance"/> <xs:element ref="ClosingCreditBalance"/> <xs:element ref="GroupingCategory"/> <xs:element name="GroupingCode" type="SAFPTGLAccountID" minOccurs="0"/> <xs:element name="TaxonomyCode" type="SAFTaxonomyCode" minOccurs="0"/> </xs:sequence> <xs:assert test=" if ((ns:GroupingCategory != 'GM' and not(ns:TaxonomyCode)) or (ns:GroupingCategory eq 'GM' and ns:TaxonomyCode)) then true() else false()" /> <xs:assert test=" if ((ns:GroupingCategory eq 'GR' and not(ns:GroupingCode)) or (ns:GroupingCategory eq 'AR' and not(ns:GroupingCode)) or (ns:GroupingCategory eq 'GA' and ns:GroupingCode) or (ns:GroupingCategory eq 'AA' and ns:GroupingCode) or (ns:GroupingCategory eq 'GM' and ns:GroupingCode) or (ns:GroupingCategory eq 'AM' and ns:GroupingCode)) then true() else false()" /> </xs:complexType> Test script: --------------- try { \libxml_use_internal_errors(true); $validate = true; $dom = new \DOMDocument("1.0", "ISO-8859-1"); $dom->load("D:/Downloads/saftpt1.04_01.xsd"); $validate = $dom->schemaValidate(self::XSD_PATH); } catch (\Exception $e) { $allErrors = libxml_get_errors(); $a = $e->getMessage(); } Expected result: ---------------- Should accept the xsd to validate the xml Actual result: -------------- Throws error, [0] => LibXMLError object { level => (int) 2 code => (int) 3033 column => (int) 0 message => (string) Element '{http://www.w3.org/2001/XMLSchema}complexType': The content is not valid. Expected is (annotation?, (simpleContent | complexContent | ((group | all | choice | sequence)?, ((attribute | attributeGroup)*, anyAttribute?)))). file => (string) file:/D:/NetBeansProjects/PHP/Saft-PT_4_PHP/tests/Rebelo/Test/../../Ressources/saftpt1.04_01.xsd line => (int) 196