XML Validator in SWI-Prolog

We received two files from government : .xsd and .xml.
From the xsd we selected all necessary data.
Now we want to validate xml file against the (altered) xsd.
xsd_validate(+Schema, +Document)
This validates but output is ‘true’ of ‘false’
output should be a Modified XML for the Modified Xsd , out of de original XML
?- start_xml_xsd().
results in: Warning: SGML2PL(xmlns): dossiers_2022.xsd:1: #PCDATA ("") not allowed here

  • we have 1 XML with 1 XSD which represents its structure
  • we have modified the XSD file , we stripped out the unwanted fields
  • now we want to have a New stripped XML for the the modified Xsd

Hi, author of library(xsd) here. Would you mind sending me both files via e-mail or in a GitHub issue, so we could see what’s going wrong here?

Would’t XSLT be the tech of choice for that …

XSLT is sadly just a language/spec. You need an implementation in order to use it, and at that point you have to start making decisions what to use and what it means for your use case.

As far as i recall, I used an XSLT processor, with a built-in debugger – to translate between one XML based representation to another one