GNOME Bugzilla – Bug 646219
xmlSchemaValidateStream not functioning properly
Last modified: 2021-07-05 13:22:00 UTC
Created attachment 184682 [details] Function for Validation of XSD As the Parameter1 for xmlSchemaValidateStream, I gave the first parameter as an XSD and the input XML supplied is a wrong one accordingly with the XSD. As the name seems the validation should fail at very beginning of the element (not mentioned in XSD), but it fails after parsing of the end tag of the element. XSD is <xsd:element name="Request"> <xsd:complexType> <xsd:sequence> <xsd:element name="sso" type="xsd:string" /> <xsd:element name="ConfigCollection" type="ConfigCollectionType" maxOccurs="unbounded"/> </xsd:sequence> <xsd:attribute name="module" type="xsd:string" fixed="NodeAttributes" use="required"/> <xsd:attribute name="command" type="xsd:string" fixed="SetConfigData" use="required"/> </xsd:complexType> </xsd:element> XML is <Request command="SetConfigData" module="NodeAttributes"> <sso>HOYlrk97pNPjWqCAB8h5JsOLm/imd4xC</sso> <Configllection HostIP="10.0.15.90"> <Rawdata> [Mentioned in XSD as type] Accordingly with the above shown XSD and XML as the element Configllection is not specified in XSD, the parse should fail immediately but the func. does'nt
Sorry, If am not Clear, pls. refer to bug#646304 !!
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/libxml2/-/issues/ Thank you for your understanding and your help.