-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
blockedThis issue is waiting on another issue to be done firstThis issue is waiting on another issue to be done firstenhancementNew feature or requestNew feature or request
Description
First, thanks for libxml2-wasm - I am enjoying the capabilities and performance and am using it my DVB-I validation tools.
I recently noticed an issue with XsdValidator.validate() that was not present when I previously used libxmljs2 (or at least I don't recall seeing it) and have created a small project to demonstrate it - https://github.com/paulhiggs/wasm-validate
The call to validator.validate(document1) throws an error as there is a misplaced element LCNTableList but there are also some errrors not reported.
Attempting to validate the same document in Altova XMLSpy yields 4 errors
File E:\code\wasm-validate\ospTest.xml is not valid.
Element <LCNTableList> is not allowed at this location under element <ServiceList id="tag:onscreenpublishing.com,2024:ospTest">.
Reason: The following elements are expected at this location (see below)
'{##any except ##local urn:dvb:metadata:servicediscovery:2025}'
Error location: ServiceList / LCNTableList
Element <URI> is not allowed under element <UriBasedLocation>.
Reason: The following elements are expected at this location (see below)
'dvbi-types:URI'
Hint: Element <URI> is in namespace 'urn:dvb:metadata:servicediscovery:2025', but a correspondent element from namespace 'urn:dvb:metadata:servicediscovery-types:2025' would be permitted.
Error location: ServiceList / Service / ServiceInstance / DASHDeliveryParameters / UriBasedLocation / URI
Element <CMCD> is not allowed under element <ServiceInstance>.
Reason: The following elements are expected at this location (see below)
'dvbisd:MulticastTSDeliveryParameters'
Error location: ServiceList / Service / ServiceInstance / CMCD
Element <URI> is not allowed under element <UriBasedLocation>.
Reason: The following elements are expected at this location (see below)
'dvbi-types:URI'
Hint: Element <URI> is in namespace 'urn:dvb:metadata:servicediscovery:2025', but a correspondent element from namespace 'urn:dvb:metadata:servicediscovery-types:2025' would be permitted.
Error location: ServiceList / Service / ServiceInstance / DASHDeliveryParameters / UriBasedLocation / URI
but xmllint seems to concur with libxml2-wasm...
>xmllint --schema dvbi_v7.0-with-hls-hbbtv.xsd --noout ospTest.xml
hls-url-7.0.xsd:3: element import: Schemas parser warning : Element '{http://www.w3.org/2001/XMLSchema}import': Skipping import of schema located at 'dvbi-types_v1.1.xsd' for the namespace 'urn:dvb:metadata:servicediscovery-types:2025', since this namespace was already imported with the schema located at 'dvbi_types_v1.1.xsd'.
ospTest.xml:51: element LCNTableList: Schemas validity error : Element '{urn:dvb:metadata:servicediscovery:2025}LCNTableList': This element is not expected. Expected is ( ##other{urn:dvb:metadata:servicediscovery:2025}* ).
ospTest.xml fails to validate
Is there any way to collect all validation errors via libxml2-wasm?
Metadata
Metadata
Assignees
Labels
blockedThis issue is waiting on another issue to be done firstThis issue is waiting on another issue to be done firstenhancementNew feature or requestNew feature or request