Closed demilatof closed 9 months ago
Is that a problem that makes it impossible to parse the XSLT output or does it only occur when you try to validate the output?
Is that a problem that makes it impossible to parse the XSLT output or does it only occur when you try to validate the output?
To parse the document you have to pre-parse it with your preferred XML framework and this step fails: the document produced when there are multiple agreements is not well formed because it is missing a root element, so any parser will fail.
There is no XML schema, so technically you can't and shouldn't validate it.
Please review the proposed change.
Please review the proposed change.
It seems to me that now the two XSLTs produce good XML (I've tested them online). Thanks
Thanks to @fioravanti-unibo 's notice, I have realized that there is a bug in the XSLTs, so that they produce invalid XML when the IIA-Get-Response contains more IIAs. The problem is that if we have more than one IIA the XSLT output lacks the root element. You can verify by yourself here https://www.w3schools.com/xml/xml_validator.asp If you put in the validator box the actual result of XSLT transformation:
you have no error; BUT if you add a second IIA to the XML produced by the XSLT
The validation fails. The solution is easy, just adding a wrapping element, e.g.:
The above code is correct for the W3C validator.
We can obtain a good XML just changing two lines in the XSLT. For the transform_version_7.xsl we can
<iia-processed>
at line 61</iia-processed>
after line 115And similar for transform_version_6.xsl