There are many <span>s in MARC21slim2OPACResults.xsl which contain block-level elements, which is invalid. There's no reason for these not to be converted to <div>s.
This bug is revealed but not caused by Bug 27613 because it adds <ul> to these spans. The validation error in question is: Element ul not allowed as child of element span in this context.
Created attachment 116330 [details] [review] Bug 27627: Fix invalid HTMl in OPAC results XSLT: change spans to divs This patch modifies the XSL template for OPAC search results in order to improve HTML validation: Changing some <span>s to <div>s will prevent an error when those <span>s contain block-level elements. To test, apply the patch and restart_all if necessary. - Confirm that OPACXSLTResultsDisplay is set to "default" - Perform a catalog search in the OPAC. - Validate the page source and confirm that there are no errors about "Element ul not allowed as child of element span in this context" Note: another patch will address other validation errors.
Created attachment 116332 [details] [review] Bug 27627: Fix invalid HTMl in OPAC results XSLT: change spans to divs This patch modifies the XSL template for OPAC search results in order to improve HTML validation: Changing some <span>s to <div>s will prevent an error when those <span>s contain block-level elements. To test, apply the patch and restart_all if necessary. - Confirm that OPACXSLTResultsDisplay is set to "default" - Perform a catalog search in the OPAC. - Validate the page source and confirm that there are no errors about "Element ul not allowed as child of element span in this context" Note: another patch will address other validation errors. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen, I signed off on this one too hastily. There is still one <span>, .results_summary .type that should be a <div> Also, the display is now altered as each of the elements 'results_material_type', 'results_format', 'results_contents_literary' now displaying block instead of displaying inline https://snipboard.io/FNIiRL.jpg
Created attachment 116334 [details] [review] Bug 27627: (follow-up) Change one more span to div
Created attachment 116438 [details] [review] Bug 27627: (follow-up) change div nested inside .type to span
Hi Lucas and Owen, does this need signing off again? Have the issues Lucas raised been fixed by the follow-ups? "Owen, I signed off on this one too hastily. There is still one <span>, .results_summary .type that should be a <div> Also, the display is now altered as each of the elements 'results_material_type', 'results_format', 'results_contents_literary' now displaying block instead of displaying inline"
(In reply to Henry Bolshaw from comment #7) > Hi Lucas and Owen, does this need signing off again? Have the issues Lucas > raised been fixed by the follow-ups? > > "Owen, I signed off on this one too hastily. There is still one <span>, > .results_summary .type that should be a <div> > > Also, the display is now altered as each of the elements > 'results_material_type', 'results_format', 'results_contents_literary' now > displaying block instead of displaying inline" I think these sound like good catches - setting FQA
Created attachment 127455 [details] [review] Bug 27627: Fix invalid HTMl in OPAC results XSLT: change spans to divs This patch modifies the XSL template for OPAC search results in order to improve HTML validation: Changing some <span>s to <div>s will prevent an error when those <span>s contain block-level elements. To test, apply the patch and restart_all if necessary. - Confirm that OPACXSLTResultsDisplay is set to "default" - Perform a catalog search in the OPAC. - Validate the page source and confirm that there are no errors about "Element ul not allowed as child of element span in this context"
Created attachment 127544 [details] [review] Bug 27627: Fix invalid HTMl in OPAC results XSLT: change spans to divs This patch modifies the XSL template for OPAC search results in order to improve HTML validation: Changing some <span>s to <div>s will prevent an error when those <span>s contain block-level elements. To test, apply the patch and restart_all if necessary. - Confirm that OPACXSLTResultsDisplay is set to "default" - Perform a catalog search in the OPAC. - Validate the page source and confirm that there are no errors about "Element ul not allowed as child of element span in this context" Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
All works as expected now, nice bit of tidying up.
Right now waiting for its dependency.
Created attachment 130976 [details] [review] Bug 27627: Fix invalid HTMl in OPAC results XSLT: change spans to divs This patch modifies the XSL template for OPAC search results in order to improve HTML validation: Changing some <span>s to <div>s will prevent an error when those <span>s contain block-level elements. To test, apply the patch and restart_all if necessary. - Confirm that OPACXSLTResultsDisplay is set to "default" - Perform a catalog search in the OPAC. - Validate the page source and confirm that there are no errors about "Element ul not allowed as child of element span in this context" Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
We should do the same in OPAC details XSLT no ?
Pushed to master for 22.05, thanks to everybody involved [U+1F984]